Opened 12 years ago
Closed 12 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: |
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 (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.