Skip to main content

Bug Tracker

Side navigation

#4232 closed bug (duplicate)

Opened February 24, 2009 04:50PM UTC

Closed May 14, 2009 01:05AM UTC

New :visible logic fails on hidden table rows in IE7

Reported by: cmlenz Owned by: john
Priority: critical Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

The new :visible logic introduced in 1.3.2 doesn't work correctly for hidden table rows in IE7, and probably IE6. Haven't tested IE8.

The issue is that IE still reports a >0 offsetWidth for the rows, only the offsetHeight is ==0. I'll attach a simple HTML page that demonstrates the problem.

I think the fix would be:

Index: src/selector.js
===================================================================
--- src/selector.js	(revision 6253)
+++ src/selector.js	(working copy)
@@ -958,7 +958,7 @@
 };
 
 Sizzle.selectors.filters.visible = function(elem){
-	return elem.offsetWidth > 0 || elem.offsetHeight > 0;
+	return elem.offsetWidth > 0 && elem.offsetHeight > 0;
 };
 
 Sizzle.selectors.filters.animated = function(elem){
Attachments (1)
Change History (5)

Changed February 27, 2009 02:49AM UTC by dmethvin comment:1

I tried a simple test case and it seems to work correctly with 1.3.2 in IE8 (all I have on this PC). Can you attach a case that fails in IE7 just to be sure?

Changed February 28, 2009 02:37PM UTC by jerone comment:2

The test case fails correctly for IE6, IE7, IE8 RC1 for me.

Changed March 11, 2009 03:10PM UTC by Heliologue comment:3

I can confirm this in IE6 and IE7.

Changed March 20, 2009 02:17PM UTC by Heliologue comment:4

This ticket is duplicated (and fixed) in #4374. Looks like the aforementioned change to {{selector.js}} was made in r6282.

Changed May 14, 2009 01:05AM UTC by dmethvin comment:5

resolution: → duplicate
status: newclosed

Dup/fixed #4374. Thanks Heliologue!