Skip to main content

Search and Top Navigation

#10736 closed bug (notabug)

Opened December 29, 2014 08:33PM UTC

Closed December 31, 2014 09:28PM UTC

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/

Attachments (0)
Change History (1)

Changed December 31, 2014 09:28PM UTC by tj.vantoll comment:1

resolution: → notabug
status: newclosed

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 the
connectToSortable
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”.