Ticket #5110 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

zIndex() only checks inline style, and ignores CSS

Reported by: btburnett3 Owned by:
Priority: minor Milestone: 1.8
Component: ui.core Version: 1.8rc1
Keywords: zIndex Cc:
Blocking: Blocked by:

Description

zIndex() uses elem.style to test for the z-index style on each element as it traverses up the tree. Using css() makes more sense, since this will get effective style including z-index applied via CSS.

Change History

comment:1 Changed 5 years ago by btburnett3

Fixed in r3755

Fix does two things. First, it uses css() to get the z-index so that effective styles are used instead of only inline styles.

Second, it now only pays attention to a z-index setting if the element is positioned (absolute, relative, or fixed). The z-index setting is actually ignored if the element isn't positioned, and WebKit browsers will always return "auto" from getCurrentStyle().zIndex if the element isn't positioned, no matter what it has been set to. By checking this style it makes behavior consistent across browsers.

comment:2 Changed 5 years ago by rdworth

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.