Opened 8 years ago
Closed 8 years ago
#10736 closed bug (notabug)
Draggable connected to sortable adds helper instead of item
Reported by: | electricsam | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.draggable | Version: | 1.11.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When connecting a draggable to a sortable with a helper, the helper is added to the sortable instead of the item. Also, the ui.item in the stop callback is the helper and the ui.helper is null.
This used to work in jQuery UI 1.9.2.
Here is a JSFiddle: http://jsfiddle.net/8Lg4rexz/2/
Note: See
TracTickets for help on using
tickets.
This is expected behavior. The
helper
property is set to null because it's referring to the sortable's helper, which is not relevant when adding an external draggable. The helper is what is intended to be added to the sortable. If you look at theconnectToSortable
option's docs (http://api.jqueryui.com/draggable/#option-connectToSortable) it notes that “The helper option must be set to "clone" in order to work flawlessly”.