rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
547 stars 128 forks source link

Dragging causes duplicates (and deletes another) #163

Open revbones opened 8 years ago

revbones commented 8 years ago

I have 7 items being displayed. If I drag the first down anywhere, it gets placed at the bottom AND a copy overwrites what was the second item with a copy of the one being moved.

Before a move, my list is: Alex, Melvin, Valentin, Joseph, Rudolf, Javier, Matt. I drag Alex to position 3, and drop it. The list then becomes: Alex, Valentin, Joseph, Rudolf, Javier, Matt, Alex.

revbones commented 8 years ago

Upon further research this seems to be caused by my having 2 additional listItems that are visible based on properties of the viewmodel. Both listItems contain the class "ui-state-disabled" but even with that removed, the issue still exists.

Sample of the html is included in the attached text file (since GitHub won't let me paste in html).

sample.txt