Opened 8 years ago
Closed 8 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: |
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)) { [ ... ] }
Change History (3)
comment:1 Changed 8 years ago by
Cc: | timmywil gibson042 added |
---|
comment:2 Changed 8 years ago by
Owner: | set to johnslegers |
---|---|
Status: | new → pending |
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 8 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
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!
Won't that permanently disable qSA for IE8 though? That's gonna hurt. timmywil or gibson02, your thoughts?