Bug Tracker

Modify

Ticket #2944 (closed bug: wontfix)

Opened 5 years ago

Last modified 2 years ago

Query z-index in IE6 with css

Reported by: tonyt Owned by: flesler
Priority: low Milestone: 1.3
Component: css Version: 1.2.5
Keywords: Cc:
Blocking: Blocked by:

Description

To reproduce the problem

var aa = jQuey("#content").css('z-index');
var bb = (/^\d+$/.test($("#content").css('z-index')));

1.2.6 FF - aa -> auto; bb -> false IE6 -aa -> 0 ; bb->true

1.2.3 FF - aa -> auto; bb -> false IE6 -aa -> undefined ; bb->false

the element <div id="content"> some content here </div>

in css there is no attached z-index of this element

Change History

comment:1 Changed 5 years ago by tonyt

sorry for the typo the code is

var aa = jQuery("#content").css('z-index');
var bb = (/^\d+$/.test(jQuery("#content").css('z-index')));

comment:2 Changed 5 years ago by flesler

  • Owner set to flesler
  • Status changed from new to assigned
  • Milestone changed from 1.2.5 to 1.3

The undefined returned by jQuery 1.2.3 was wrong. It was a 0 "masked" into undefined. So it turns out that IE defaults zindexes to 0 and FF to auto. The question here is: Should we normalize this ? to what ?

I'll try to check other browsers to see what's the common denominator.

comment:3 Changed 5 years ago by tonyt

Looking deeper of this - actually this is a bug in IE6/IE7. If this can help here is link to this problem:

 http://aplus.co.yu/lab/z-pos/

My question too is what should jQuery return in this case? Thank you

comment:4 Changed 3 years ago by dmethvin

  • Component changed from core to css

IE returns "auto" in many cases, so whatever is done here should be compared with "auto" elsewhere.

comment:5 Changed 2 years ago by jitter

  • Priority changed from major to low
  • Status changed from assigned to closed
  • Resolution set to wontfix

It's up to the browser what the default value for a css property is. Both auto and 0 are valid values.

 test case to proof valid values are returned.

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.