Opened 12 years ago
Closed 9 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: |
Description
from draggable plugin
_createHelper: function(event) { ... if(!helper.parents('body').length) 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 12 years ago by
Component: | ui.core → ui.draggable |
---|---|
Version: | 1.8.9 → 1.8.10 |
comment:2 Changed 12 years ago by
Summary: | Append to doesn't work with original helper → Draggable: appendTo option doesn't work together with helper: 'original' |
---|
comment:3 Changed 12 years ago by
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.
comment:4 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:5 Changed 10 years ago by
Status: | new → open |
---|
comment:6 Changed 9 years ago by
Milestone: | 2.0.0 → 1.11.2 |
---|---|
Resolution: | → notabug |
Status: | open → closed |
This is expected and the documented behavior. I've opened a ticket to clarify it further, but this won't be fixed: https://github.com/jquery/api.jqueryui.com/issues/224
Minimal test page http://jsbin.com/inoye3