Opened 13 years ago

Closed 13 years ago

#5110 closed bug (fixed)

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:
Blocked by: Blocking:


zIndex() uses 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 (2)

comment:1 Changed 13 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 13 years ago by rdworth

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.