Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#6525 closed bug (fixed)

IE script error on z-index 'auto' or 'inherit'

Reported by: dtetto Owned by:
Priority: high Milestone: 1.4.3
Component: css Version: 1.4.2
Keywords: css z-index Cc:
Blocked by: Blocking:


IE 6 and 7 hit a "Type mismatch" at "Line: 4619" when setting the z-index to 'auto' or 'inherit' using .css(). Both values are valid according to the W3C ('auto' is the default!). http://www.w3.org/TR/CSS2/visuren.html#z-index

Test case at: http://www.babywhale.net/jquery/zindex-auto.php

or just run $(el).css('z-index','auto') on any element!

Change History (5)

comment:1 Changed 13 years ago by karl@…

Any workaround for this?

comment:2 Changed 13 years ago by SlexAxton

Keywords: css z-index added
Priority: high
Status: newopen

I ran the tests and got the errors. The line given didn't really make sense. Opening up for a fix.

comment:3 Changed 13 years ago by SlexAxton

Until this gets fixed, I'd suggest adding or removing a class that gives this property.

comment:4 Changed 12 years ago by jitter

Milestone: 1.4.3
Resolution: fixed
Status: openclosed

Fixed since 1.4.3. Check #5509

As this test case shows setting z-index no longer throws an exception but as e.g. IE6 doesn't regard auto as valid value setting to auto simply gets ignored by IE6.

comment:5 Changed 11 years ago by anonymous

I still get a type mismatch error on IE7 when doing

.css("z-index", "auto")
Note: See TracTickets for help on using tickets.