Bug Tracker

Opened 14 years ago

Closed 13 years ago

#5515 closed bug (worksforme)

pseudo-selector descendent selectors under html5 in IE fail

Reported by: paul.irish Owned by: john
Priority: minor Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:



(needs html5 shiv or it collapses all elements)

$('header :visible').length 0

$('header').find(':visible').length 4

$('section :contains(give)').length 0

$('section').find(':contains(give)').length 1

reproduced in IE6 and IE8

Change History (6)

comment:1 Changed 14 years ago by pbcomm

This would be a problem with IE, not jQuery.

comment:2 Changed 14 years ago by dmethvin

Paul is referring to this:


I tried the obvious, defining the tags with createElement, and it didn't seem to help.


I did notice in the html with IE8 debugger, the Sizzle sizcache and sizset attributes remain on the the elements. Not sure why that happens.

comment:3 Changed 14 years ago by paul.irish

The shiv is in there now, but the above code is still reproducible.

I would be content with this as something that needs to be documented, but I'm curious if there is a fix available at the Sizzle level.

comment:4 Changed 14 years ago by pbcomm

Try removing spaces before :visible "header:visible" and the same for contains.

comment:5 Changed 14 years ago by miketaylr

Another testpage with spaces removed here: http://miketaylr.com/test/html5pseudo_spaces.html, with the same behavior.

comment:6 Changed 13 years ago by snover

Resolution: worksforme
Status: newclosed

test case works for me using jQuery 1.4.4.

Note: See TracTickets for help on using tickets.