Skip to main content

Bug Tracker

Side navigation

#14656 closed bug (invalid)

Opened December 28, 2013 12:58PM UTC

Closed January 19, 2014 08:56AM UTC

Sizzle doesn't correctly select cloned HTML5 nodes in IE8

Reported by: johnslegers Owned by: johnslegers
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc: timmywil, gibson042
Blocked by: Blocking:
Description

Use case :

  • Polyfill HTML5 nodes with the HTML5shiv
  • Select a node containing HTML5 nodes
  • Clone the nodes to a virtual node
  • Select nodes in the virtual node

Some selectors doesn't work correctly in IE8. See the following JSBin demo : http://jsbin.com/iLAkOJI/3/ for an example.

Bypassing native 'querySelectorAll' does generate the expected result, though. This is what fixed the problem for me :

Original code on line 608 :

if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
    [ ... ]
}

New code on line 608 :

try {
   document.querySelectorAll('html:root');
   var querySelectorSupported = true;
} catch (err) {
   var querySelectorSupported = false;
}
if ((support.qsa = querySelectorSupported)) {
    [ ... ]
}
Attachments (0)
Change History (3)

Changed January 05, 2014 02:08AM UTC by dmethvin comment:1

cc: → timmywil, gibson042

Won't that permanently disable qSA for IE8 though? That's gonna hurt. timmywil or gibson02, your thoughts?

Changed January 05, 2014 06:38AM UTC by gibson042 comment:2

owner: → johnslegers
status: newpending

Equivalent code with jQuery APIs functions as expected: http://jsbin.com/Ijadazax/1

And given that HTML5 Shiv has known issues with cloning, I'm inclined to close this cantfix unless we're shown an independent bug in jQuery.

Changed January 19, 2014 08:56AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!