Opened 9 years ago

#9760 new bug

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:


When dragging an item from a sortable to another connected sortable and then sorting in the 2nd list, the sortchange is fired on the source list rather than on the current list.

Check this fiddle 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

I've run into an issue with QUnit and the simulate plugin 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: 80 and 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.

Change History (0)

Note: See TracTickets for help on using tickets.