#8809 closed bug (fixed)
Draggable: Position issue when connected to sortable
Reported by: | domnulnopcea | Owned by: | mikesherov |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.2 |
Component: | ui.draggable | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I attach a test case. just try to drag the column by the string "aaaa"
Change History (13)
comment:1 Changed 10 years ago by
Component: | ui.core → ui.draggable |
---|
comment:3 Changed 10 years ago by
Replying to domnulnopcea:
an even more reduced jsfiddle
If you had intended to leave a link to a new fiddle, I think you forgot to paste it.
comment:5 Changed 10 years ago by
comment:6 Changed 10 years ago by
Milestone: | 1.10.0 → 2.0.0 |
---|---|
Status: | new → open |
Summary: | dragged columns fly to top of the screen → Draggable: Position issue when connected to sortable |
comment:7 follow-up: 8 Changed 10 years ago by
is this going to be ever taken into account for fixing?
comment:8 Changed 10 years ago by
Replying to domnulnopcea:
is this going to be ever taken into account for fixing?
As Scott mentioned, in 1 reducing the test case would go a long ways towards helping us understand this issue. As is we're unlikely to look into this before our interactions rewrite, currently planned for 1.13. We'd be happy to review a pull request though.
comment:9 Changed 8 years ago by
Milestone: | 2.0.0 → none |
---|
This happens because the element switches to "position:absolute" from "position:relative" once it connects: http://jsfiddle.net/fx4L4/39/
This causes the draggable to have the wrong "position" while at the same time the sortable version of the same element have the correct position. One potential solution is to set the draggable's position to the sortable's position while it's connected, but I still need to figure out how to revert that should the user pull the item out of the sortable before ever letting go on the initial drag. :-\
comment:10 Changed 8 years ago by
draft PR to address this: https://github.com/jquery/jquery-ui/pull/1322
comment:11 Changed 8 years ago by
Owner: | set to mikesherov |
---|---|
Status: | open → assigned |
comment:12 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Draggable: No cloning in connectToSortable and ensure correct position
Draggables now forcefully recalculate their position when dragged out of a sortable. Sortables now override draggable position when a draggable is dragged into it. Lastly, no longer remove sortable helper when dragging a draggable out, which allows us to not use a clone.
Fixes #7734 Fixes #8809 Closes gh-1322
Changeset: 95546c5d045f8055b121f24d3e35468e2a570c1b
comment:13 Changed 8 years ago by
Milestone: | none → 1.11.2 |
---|
@domnulnopcea It would be really helpful if you could provide better descriptions and more reduced test cases in the future. For example, nowhere in this ticket do you even mention the use of sortable, or any of the dozen options you're using in the fiddle. The markup also contains a ton of classes, ids, and elements unrelated to the bug.
I've reduced the fiddle a bit, but it would be great if you could take some time and reduce the styles to the bare minimum that still shows the problem: http://jsfiddle.net/fx4L4/2/ I've also removed everything in the JS section that was unrelated to the bug. This bug appears when an element is both sortable and draggable, and is being dragged.