Skip to main content

Search and Top Navigation

#6179 closed bug (worksforme)

Opened October 13, 2010 04:39PM UTC

Closed October 13, 2010 04:42PM UTC

Last modified October 11, 2012 09:15PM UTC

Deleting draggable div causes remaining draggables to change position

Reported by: ahildoer Owned by:
Priority: minor Milestone:
Component: ui.draggable Version: 1.8.5
Keywords: draggable delete position relative Cc:
Blocked by: Blocking:

When deleting a draggable div that has draggable siblings below it in the DOM, the below siblings move after the deletion. This is because the draggable divs are position: relative. By hacking the source code I was able to remove the bug in my application by changing:




Although the fix is simple, I would rather a better solution to the problem be introduced, such has a position argument for the draggable behavior. I also like running stock 3rd party libs so having solution in the trunk is better than me modifying every copy. Note, although resizable is similar to draggable in that it can adjust the position of the top left corner of a div, resizable does not suffer from this problem.

Attachments (0)
Change History (3)

Changed October 13, 2010 04:42PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

Just make your elements absolutely positioned before making it draggable.

Changed October 14, 2010 02:22PM UTC by ahildoer comment:2

Here is more information on the behavior. And maybe this ticket should be a feature request instead of a bug in light of the following information.

draggable only checks to see if the element is positioned absolute when draggable is first applied. If position absolute, for example, is later applied via css, say when the element is attached to a new location in the DOM, the element remains position relative.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted