Opened 5 years ago

Last modified 4 years ago

#8286 open bug

Draggable: Dragged element mouse offset is incorrect when document flow changes

Reported by: sam Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.draggable Version: 1.8.19
Keywords: dbr Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/PW63J/

If the element's surrounding document flow changes it's position during a drag, the whole drag operation gets messed up. The algorithm is wrong for not considering this to happen (don't argue to me that it's right for behaving like this). A dragged element should always remain under the cursor at the same position during the entire drag operation, regardless of what document changes might effect it's CSS relative positioning.

So, a new algorithm is needed. During drag movement, the element's origin top and origin left should be used to determine how much relative positioning the element needs in order to appear as though it's being dragged by the cursor. Duh.

I hope I'm helping. Maybe I can figure out a detailed algorithm for draggable elements.

Change History (6)

comment:1 Changed 5 years ago by rdworth

Summary: Drag gets fucked up when document flow changesDrag gets messed up when document flow changes

comment:2 Changed 5 years ago by Scott González

Milestone: 1.9.02.0.0

comment:3 Changed 4 years ago by mikesherov

Status: newopen

Thanks for contributing, although you didn't need to be so rude about it, DUH! This is confirmed on latest: http://jsfiddle.net/6cfVD/

comment:4 Changed 4 years ago by sam

Okay, thank you. I didn't mean to be rude... Sooooooooooooorrrryyyyy!

comment:5 Changed 4 years ago by mikesherov

Keywords: dbr added

comment:6 Changed 4 years ago by mikesherov

Summary: Drag gets messed up when document flow changesDraggable: Dragged element mouse offset is incorrect when document flow changes
Note: See TracTickets for help on using tickets.