Search and Top Navigation
#7000 closed bug (wontfix)
Opened February 16, 2011 02:36PM UTC
Closed March 25, 2013 09:10PM UTC
Draggable: does not detect nested, removed Draggable when element is removed during drag
Reported by: | PvZ | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.draggable | Version: | 1.8.9 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Draggable does not seem to correctly detect that the original Draggable has been removed if it was part of a larger section that got removed as a whole. An example can be found at jsfiddle.
My attempt to isolate the bug pointed me to the following statement in Draggable (around line 197):
#!js //if the original element is removed, don't bother to continue if(!this.element[0] || !this.element[0].parentNode) return false;
When the Draggable itself hasn't been removed from its parent, but the parent has been removed from the DOM, this test will evaluate to false and execution will continue. The situation only gets worse in Internet Explorer as a removed element seems to have a parentNode of type DOCUMENT_FRAGMENT_NODE, which means this test will always evaluate to false.
Attachments (0)
Change History (5)
Changed October 11, 2012 02:49PM UTC by comment:1
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 27, 2012 07:36PM UTC by comment:2
status: | new → open |
---|---|
summary: | Draggable does not detect nested, removed Draggable → Draggable: does not detect nested, removed Draggable when element is removed during drag |
confirmed: http://jsfiddle.net/yZmxT/ and related to #6999 and #6871
Changed March 16, 2013 06:59PM UTC by comment:3
resolution: | → duplicate |
---|---|
status: | open → closed |
Duplicate of #8269.
Changed March 25, 2013 09:07PM UTC by comment:4
resolution: | duplicate |
---|---|
status: | closed → reopened |
Changed March 25, 2013 09:10PM UTC by comment:5
resolution: | → wontfix |
---|---|
status: | reopened → closed |
In fact, this seems like a duplicate, but is slightly different. We're only going to support removing the original on "end" callbacks. In this case, that's "stop" for draggables. I'll open a docs issue shortly to document this.