Opened 9 years ago

Closed 6 years ago

#7044 closed bug (notabug)

Draggable: appendTo option doesn't work together with helper: 'original'

Reported by: Love_silense Owned by:
Priority: minor Milestone: 1.11.2
Component: ui.draggable Version: 1.8.10
Keywords: Cc:
Blocked by: Blocking:


from draggable plugin

_createHelper: function(event) {
helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));

The if conditions means it, and it is. Looks like bug.

Change History (6)

comment:1 Changed 9 years ago by rdworth

Component: ui.coreui.draggable

comment:2 Changed 9 years ago by rdworth

Summary: Append to doesn't work with original helperDraggable: appendTo option doesn't work together with helper: 'original'

Minimal test page

comment:3 Changed 9 years ago by rdworth

In order to fix this, we would need to keep a reference to the original element's parent and index, for returning it back there. Such a reference rather than a placeholder element, as no one element type (such as div) can be put in place of all other elements (such as an li).

A workaround in the meantime is to use helper: "clone" and hide the original on dragStart and show and dragStop.

Version 0, edited 9 years ago by rdworth (next)

comment:4 Changed 8 years ago by Scott González


comment:5 Changed 7 years ago by mikesherov

Status: newopen

comment:6 Changed 6 years ago by mikesherov

Resolution: notabug
Status: openclosed

This is expected and the documented behavior. I've opened a ticket to clarify it further, but this won't be fixed:

Note: See TracTickets for help on using tickets.