Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#9481 closed bug (fixed)

Draggable: connectToSortable causes sortable revert to fail on second attempt

Reported by: djbutler Owned by: mikesherov
Priority: minor Milestone: 1.11.2
Component: ui.draggable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

When a Draggable is dragged over a Sortable but then dropped outside the Sortable, the revert behavior of the Sortable is broken.

This example is actually straight from the Docs:

http://jqueryui.com/draggable/#sortable http://jsfiddle.net/Vv5hT/

Drag the Draggable over the Sortable, but then drop it outside the Sortable. The revert behavior of the Sortable is now broken -- there is no revert animation anymore.

Change History (8)

comment:1 Changed 10 years ago by tj.vantoll

Owner: set to djbutler
Status: newpending

Hi djbutler,

Thanks for taking the time to contribute to the jQuery UI project.

I'm not seeing this behavior in Chrome, Firefox, or IE10. What browser / OS are you using?

comment:2 Changed 10 years ago by djbutler

Status: pendingnew

Thanks for the quick response tj.vantoll. Here, I made a better jsFiddle: http://jsfiddle.net/Vv5hT/1/

I've reproduced the behavior on Safari desktop/mobile and Chrome for OSX.

comment:3 Changed 10 years ago by tj.vantoll

Status: newopen
Summary: connectToSortable revert fails on second attemptSortable: connectToSortable revert fails on second attempt

Thanks for that test case djbutler. I was expecting this to be a regression, but I see the same behavior in really old versions.

Hard to believe this hasn't come up before.

comment:4 Changed 9 years ago by mikesherov

Component: ui.sortableui.draggable
Summary: Sortable: connectToSortable revert fails on second attemptDraggable: connectToSortable causes sortable revert to fail on second attempt

This is technically a bug in draggables conmectToSortabls implementation. Changing component.

comment:5 Changed 9 years ago by mikesherov

Owner: changed from djbutler to mikesherov
Status: openassigned

I have a fix for this coming shortly.

comment:6 Changed 9 years ago by Mike Sherov

Resolution: fixed
Status: assignedclosed

Draggable: Ensure sortable revert still works after draggable is removed

Fixes #9481

Changeset: e8c99b9abf7ca9368668ee5886e469d31ea33c09

comment:7 Changed 9 years ago by Mike Sherov

Draggable: Add battery of tests to cover connectToSortable

Refs #9481 Refs #9675 Closes gh-1323

Changeset: bfb65076e4727d4d7fc88561b0304853accb925c

comment:8 Changed 9 years ago by mikesherov

Milestone: none1.11.2
Note: See TracTickets for help on using tickets.