mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Blackberry 4.6 is capable of finding elements that are no longer in the DOM via getElementById. It only appears to happen when the node has been inside of a cloned Document Fragment. Fixes #6963.
This commit is contained in:
parent
43fbe3b33a
commit
1ead20c2ed
@ -119,7 +119,9 @@ jQuery.fn = jQuery.prototype = {
|
|||||||
} else {
|
} else {
|
||||||
elem = document.getElementById( match[2] );
|
elem = document.getElementById( match[2] );
|
||||||
|
|
||||||
if ( elem ) {
|
// Check parentNode to catch when Blackberry 4.6 returns
|
||||||
|
// nodes that are no longer in the document #6963
|
||||||
|
if ( elem && elem.parentNode ) {
|
||||||
// Handle the case where IE and Opera return items
|
// Handle the case where IE and Opera return items
|
||||||
// by name instead of ID
|
// by name instead of ID
|
||||||
if ( elem.id !== match[2] ) {
|
if ( elem.id !== match[2] ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user