Opened 9 years ago
Closed 9 years ago
#11250 closed bug (duplicate)
ui.sortable no longer works with different stacking contexts (1.11.2 regression)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | 1.11.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi there,
I recently updated to jquery-ui 1.11.2 and noticed a weird new behaviour when dragging a draggable element into a sortable container when the sortable container is in a different stacking context. Basically, what happens is the draggable element gets "stuck" inside the sortable container, and it's position glitches out if you attempt to drag it outside the container. I'm not 100% sure why this happens, but it seems to be related to dragging an item from one stacking context to a next.
Steps to reproduce are included in the following fiddles:
- expected behaviour, working in 1.11.1: http://jsfiddle.net/vp0bcb33/2/
- unexpected behaviour, regression in 1.11.2: http://jsfiddle.net/wkwxne3x/1/
Note that this only seems to happen when the sortable container is in a different stacking context (in the examples above, I'm using two fixed position divs). After a bit of debugging, it seems to be related to how the "clone" helper is moved around the DOM. When the clone enters the sortable container, it gets added to the sortable, which causes it to render within the new stacking context. Beyond the visual annoyance (especially if the sortable container has overflow: hidden), the positioning of the draggable element goes crazy...
Duplicate of #10669.