Opened 4 years ago

Closed 3 years ago

Last modified 3 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 4 years ago by tj.vantoll

  • Owner set to djbutler
  • Status changed from new to pending

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 4 years ago by djbutler

  • Status changed from pending to new

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 4 years ago by tj.vantoll

  • Status changed from new to open
  • Summary changed from connectToSortable revert fails on second attempt to Sortable: 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 3 years ago by mikesherov

  • Component changed from ui.sortable to ui.draggable
  • Summary changed from Sortable: connectToSortable revert fails on second attempt to Draggable: connectToSortable causes sortable revert to fail on second attempt

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

comment:5 Changed 3 years ago by mikesherov

  • Owner changed from djbutler to mikesherov
  • Status changed from open to assigned

I have a fix for this coming shortly.

comment:6 Changed 3 years ago by Mike Sherov

  • Resolution set to fixed
  • Status changed from assigned to closed

Draggable: Ensure sortable revert still works after draggable is removed

Fixes #9481

Changeset: e8c99b9abf7ca9368668ee5886e469d31ea33c09

comment:7 Changed 3 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 3 years ago by mikesherov

  • Milestone changed from none to 1.11.2
Note: See TracTickets for help on using tickets.