Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9077 closed bug (fixed)

Draggable: stack option resets the z-index

Reported by: janesconference Owned by:
Priority: minor Milestone: 1.10.1
Component: ui.draggable Version: 1.10.0
Keywords: Cc:
Blocked by: Blocking:


*test case here*:

This bug is observed when one's using draggables with the stack option activated, like in:

$( ".plugin" ).draggable({cursor: "move", opacity: 0.9, stack: ".plugin", scroll: true});

Problem: When one of the divs gets dragged, its z-index is reset to 1 (and incremented each time it is sent to the top, because of the stack option).

Desidered behaviour: The div z-index should start from the original z-index value for the .plugin divs (200, in the linked test case) and be incremented from that value.

Additional details: Jquery-ui 1.7 had a min parameter for the stack option.

In newer versions of jquery-ui (1.9.2 to 1.10 is affected, for instance), you can only specify a selector, and, from which I can understand, the stacking should start from the pre-existent z-index of the element. Instead, it seems arbitrarily re-starting at 1.

Change History (4)

comment:1 Changed 10 years ago by tj.vantoll

Status: newopen
Summary: Draggables with the stack option reset the z-index of the element when draggedDraggable: stack option resets the z-index

See #4365 for discussion of the hash for the stack option being removed.

It looks like the min is *supposed* to be the z-index of the first element matching the selector - That indeed does not appear to be working.

comment:3 Changed 10 years ago by TJ VanToll

Resolution: fixed
Status: openclosed

Draggable: Account for z-index set in CSS for the stack option. Fixed #9077 - Draggable: stack option resets the z-index

Changeset: c32bebd1bd28d158b017bb1dd7f95fb1d8a8d567

comment:4 Changed 10 years ago by tj.vantoll

Milestone: none1.10.1
Note: See TracTickets for help on using tickets.