Draggable: Dragged element mouse offset is incorrect when document flow changes
|Reported by:||sam||Owned by:|
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 changed from Drag gets fucked up when document flow changes to Drag gets messed up when document flow changes