Skip to main content

Bug Tracker

Side navigation

#5515 closed bug (worksforme)

Opened November 15, 2009 05:18AM UTC

Closed November 19, 2010 06:35AM UTC

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:
Description

http://miketaylr.com/test/html5pseudo.html

(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

Attachments (0)
Change History (6)

Changed November 15, 2009 06:53AM UTC by pbcomm comment:1

This would be a problem with IE, not jQuery.

Changed November 15, 2009 03:04PM UTC by dmethvin comment:2

Paul is referring to this:

http://ejohn.org/blog/html5-shiv/

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

  document.createElement('header');
  document.createElement('hgroup');
  document.createElement('section');

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.

Changed November 18, 2009 07:05PM UTC by paul.irish comment:3

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.

Changed November 24, 2009 01:03PM UTC by pbcomm comment:4

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

Changed November 24, 2009 03:02PM UTC by miketaylr comment:5

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

Changed November 19, 2010 06:35AM UTC by snover comment:6

resolution: → worksforme
status: newclosed

test case works for me using jQuery 1.4.4.