From 1ead20c2ed7cb4fd647d632ff9de8104669482de Mon Sep 17 00:00:00 2001 From: John Resig Date: Fri, 27 Aug 2010 15:14:30 -0400 Subject: [PATCH] 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. --- src/core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 6e1f74520..905a39931 100644 --- a/src/core.js +++ b/src/core.js @@ -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] ) { -- 2.39.5