Bug Tracker

Modify

Ticket #6525 (closed bug: fixed)

Opened 4 years ago

Last modified 2 years ago

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

Description

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

comment:1 Changed 3 years ago by karl@…

Any workaround for this?

comment:2 Changed 3 years ago by SlexAxton

  • Keywords css z-index added
  • Priority set to high
  • Status changed from new to open
  • Milestone changed from 1.4.3 to 1.5

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

comment:3 Changed 3 years ago by SlexAxton

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

comment:4 Changed 3 years ago by jitter

  • Status changed from open to closed
  • Resolution set to fixed
  • Milestone set to 1.4.3

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 2 years ago by anonymous

I still get a type mismatch error on IE7 when doing

.css("z-index", "auto")

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.