Opened 3 years ago

Closed 2 years ago

#14683 closed bug (fixed)

Sortable: Setting opacity changes z-index: auto to z-index: 0

Reported by: crashedsnow Owned by: Scott González
Priority: minor Milestone: 1.12.2
Component: ui.sortable Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:

Description

If you set an opacity value in the sortable config, and you are using bootstrap dropdown menus inside each list item, the dropdown will render behind other list items after it's been dragged once.

See the following for an example:

http://www.bootply.com/LIJLo5drTk

If you drag/drop one of the items, then click the menu it will render behind other items:

http://cl.ly/image/3L453K1L1C1b

Change History (3)

comment:1 Changed 3 years ago by Scott González

Component: ui.coreui.sortable
Status: newopen

This is happening because the sortable item gets z-index: 0 set when the opacity option is enabled. I'm not sure why this happens and I don't see any code in the widget that would be causing this, but it's definitely coming from the sortable widget.

comment:2 Changed 2 years ago by Scott González

Milestone: none1.12.2
Summary: Setting opacity in sortable breaks bootstrap dropdown z-indexSortable: Setting opacity changes z-index: auto to z-index: 0

comment:3 Changed 2 years ago by Scott González

Owner: set to Scott González
Resolution: fixed
Status: openclosed

In 9c5ce4c:

Sortable: Fix z-index switching from auto to 0

Save z-index before saving opacity. Setting opacity automatically
changes z-index.

Fixes #14683
Closes gh-1762

Note: See TracTickets for help on using tickets.