Skip to content

Commit

Permalink
Blackberry 4.6 is capable of finding elements that are no longer in t…
Browse files Browse the repository at this point in the history
…he DOM via getElementById. It only appears to happen when the node has been inside of a cloned Document Fragment. Fixes #6963.
  • Loading branch information
jeresig committed Aug 27, 2010
1 parent 43fbe3b commit 1ead20c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ jQuery.fn = jQuery.prototype = {
} else {
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
// by name instead of ID
if ( elem.id !== match[2] ) {
Expand Down

0 comments on commit 1ead20c

Please sign in to comment.