Search and Top Navigation
#9760 new bug ()
Opened January 21, 2014 05:33PM UTC
Last modified January 21, 2014 05:33PM UTC
Change event is triggered on source list rather than current list when using connected sortables
Reported by: | NiGhTTraX | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When dragging an item from a sortable to another connected sortable and then sorting in the 2nd list, the
sortchangeis fired on the source list rather than on the current list.
Check this fiddle http://jsfiddle.net/Tp3Sd/ for more details.
Drag an item from the list on the left (s1) to the list on the right (s2) and then continue to sort in the second list. You'll see that the change event is triggered on s1 when it should be triggered on s2.
Here's my branch that fixes this https://github.com/NiGhTTraX/jquery-ui/compare/jquery:master...NiGhTTraX:fix_change?expand=1
I've run into an issue with QUnit and the
simulateplugin which causes my 2nd test to fail. No matter how much I drag an item from the first list to the second, it always ends up in the first position. It doesn't even intersect with the other items and trigger change events. I tried with
dy: 80and I've tried with
dy: 8000, it makes no difference.
However, if I test the fix by hand I can see that it works as expected. You can uncomment the script tag in the fiddle to test it yourself.