angular-ui / ui-sortable

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

Weird behaviour when trying to sort element1 to element2. #470

Closed eldimious closed 8 years ago

eldimious commented 8 years ago

There is a strange behaviour when i am trying to drag and sort a ul. it recognizes when y move an element from position 2 to position 1 and update the ng-model, but not recognizes the opposite and doesnt update the ng-model. In both occasions all the events are fired, but when i am trying the occasion from position 1->2 the ng-model is not updated in the stop event. I have use the latest version of angular-ui-sortable and the 2.2.4 jquery's version and this is my code.

`

thgreasi commented 8 years ago

The code that you provided seems correct and I wasn't able to reproduce :-/ It would be great if you could fork the Connected sortables demo found in README to provide your use case.

eldimious commented 8 years ago

Hey, it happens exactly the same error as in this jsfiddle -> http://jsfiddle.net/gw5fp/37/ Try to move the "one" element to "two" element and the opposite and take a look at the div under the ul.

thgreasi commented 8 years ago

I'm sorry but angular-ui.min.js is v0.4.0 which is two year old and doesn't support angular v1.2+. The angular-ui project has been split to separate modules. Please try one of the examples found in README and re-open if you still face the same issue.