Skip to main content

Bug Tracker

Side navigation

#9597 closed bug (patchwelcome)

Opened June 15, 2011 10:32PM UTC

Closed July 12, 2011 06:07PM UTC

Last modified April 25, 2012 05:19PM UTC

Selector not finding param inside an object in IE8

Reported by: Motty Owned by:
Priority: low Milestone: 1.next
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

When trying to find a param inside an object, it returns nothing; but if I find the children of the object, it returns the list of param. Demo: http://jsfiddle.net/Qx4nQ/1/

$('object param').length // returns 0
$('object').children().length // returns correct #

This problem occurs in IE8 only and in all of the latest versions of jQuery; it works correctly in v1.2.6.

The demo I made is using SWFObject, but this also applies to embed code directly from YouTube.

Attachments (0)
Change History (5)

Changed June 15, 2011 10:44PM UTC by Motty comment:1

Oops, correction in the last statement above... the embed code directly from YouTube won't find the param using either example above. The children() selector returns the embed tag.

Changed June 15, 2011 11:12PM UTC by rwaldron comment:2

component: unfiledselector
priority: undecidedlow
status: newopen

This line from Sizzle is likely the issue. Especially since this used to work

https://github.com/jquery/sizzle/blob/master/sizzle.js#L1170-1174

Changed June 15, 2011 11:12PM UTC by rwaldron comment:3

Changed July 12, 2011 06:07PM UTC by john comment:4

resolution: → patchwelcome
status: openclosed

That line can't be the issue because we're never getting to it -- IE 8 has a (somewhat) working querySelectorAll implementation and apparently doesn't know how to find param elements in this case. Unfortunately I'm not really sure if we can reasonably do anything to fix this problem on our end.

Changed April 25, 2012 05:19PM UTC by rwaldron comment:5

#11646 is a duplicate of this ticket.