Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14656 closed bug (invalid)

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:


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 {
   var querySelectorSupported = true;
} catch (err) {
   var querySelectorSupported = false;
if ((support.qsa = querySelectorSupported)) {
    [ ... ]

Change History (3)

comment:1 Changed 9 years ago by dmethvin

Cc: timmywil gibson042 added

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

comment:2 Changed 9 years ago by gibson042

Owner: set to 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.

comment:3 Changed 9 years ago by trac-o-bot

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!

Note: See TracTickets for help on using tickets.