Skip to main content

Search and Top Navigation

#8809 closed bug (fixed)

Opened November 12, 2012 01:46PM UTC

Closed August 23, 2014 07:11PM UTC

Last modified August 23, 2014 07:12PM UTC

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"

http://jsfiddle.net/domnulnopcea/fx4L4/1/

Attachments (0)
Change History (13)

Changed November 12, 2012 02:55PM UTC by scottgonzalez comment:1

component: ui.coreui.draggable

@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.

Changed November 12, 2012 02:59PM UTC by domnulnopcea comment:2

an even more reduced jsfiddle

Changed November 12, 2012 03:01PM UTC by scottgonzalez comment:3

Replying to [comment:2 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.

Changed November 12, 2012 03:02PM UTC by domnulnopcea comment:4

Changed November 12, 2012 03:04PM UTC by scottgonzalez comment:5

Replying to [comment:4 domnulnopcea]:

http://jsfiddle.net/domnulnopcea/5sHuX/

That's exactly the same as http://jsfiddle.net/fx4L4/2/

Changed November 13, 2012 10:58PM UTC by scottgonzalez comment:6

milestone: 1.10.02.0.0
status: newopen
summary: dragged columns fly to top of the screenDraggable: Position issue when connected to sortable

Changed April 22, 2013 12:06PM UTC by domnulnopcea comment:7

is this going to be ever taken into account for fixing?

Changed April 23, 2013 04:14AM UTC by tj.vantoll comment:8

Replying to [comment:7 domnulnopcea]:

is this going to be ever taken into account for fixing?

As Scott mentioned, in [comment: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.

Changed August 21, 2014 12:49PM UTC by mikesherov comment:9

milestone: 2.0.0none

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. :-\\

Changed August 22, 2014 07:18PM UTC by mikesherov comment:10

Changed August 22, 2014 09:42PM UTC by mikesherov comment:11

owner: → mikesherov
status: openassigned

Changed August 23, 2014 07:11PM UTC by Mike Sherov comment:12

resolution: → fixed
status: assignedclosed

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

Changed August 23, 2014 07:12PM UTC by mikesherov comment:13

milestone: none1.11.2