angular-ui / ui-sortable

jQuery UI Sortable for AngularJS
http://angular-ui.github.io/ui-sortable/
MIT License
1.26k stars 443 forks source link

Sorting doesn't work properly with jquery 3.1 and jquery-ui 1.12.1 #505

Closed watzak closed 7 years ago

watzak commented 7 years ago

Hi

I have used your plugin with jquery 2.2.2 and jquery-ui v1.12.0! It just worked perfect!

But after updating to jquery 3.1, the sorting doesn't work properly!

Please check out my demo site https://jsbin.com/fifiwiruga/1/edit?html,js,output

screen

thgreasi commented 7 years ago

That's strange, since the examples in README work fine. EG: the simple sorting example. What versiuon of ui-sortable are you using? Can you try updating?

thgreasi commented 7 years ago

Also the jsbin example was not running at all for me. screen shot 2017-02-13 at 11 57 26

watzak commented 7 years ago

@thgreasi : Please use following url => https://jsbin.com/fifiwiruga/1/edit?html,js,output

thgreasi commented 7 years ago

Still can't drag anything.

thgreasi commented 7 years ago

Please update your ui-sortable version and avoid using ng-class on the ng-repeated element. Please use the provided examples as a reference point.

watzak commented 7 years ago

Hello @thgreasi

I have now made changes as described!

But it's still not working properly! Please check out by yourself => https://jsbin.com/boqucaloka/1/edit?html,js,output

Switch one (1) with second (2) element and u will find 1 at the bottom :(

Thanx in advance

thgreasi commented 7 years ago

Is this working as expected?

watzak commented 7 years ago

no, unfortunately not ;) Expected: If I switch one with second item, then second item would become first and first would become second Right now I switch one with first: Second becomes first! Thats ok! But first becomes last item! That's not what I would excpect to behonest ;)

=> https://jsbin.com/boqucaloka/1/edit?html,js,output

watzak commented 7 years ago

ah now I clicked on your sample! Yes it looks good ;) I will check your sample => https://jsbin.com/suveqimuco/1/edit?html,js,output

Thanx in advance ;)

watzak commented 7 years ago

@thgreasi : Thanx a lot ;)

with track by $index it's just working ;)