From b46dff39c35ae05f92f6909ff8d07aa470e4a8d4 Mon Sep 17 00:00:00 2001 From: Anton M Date: Tue, 8 Feb 2011 17:15:55 +0100 Subject: [PATCH] Make sure that mousing over Chrome "internal div" doesn't trigger a mouseleave. Fixes #8209. Follow up to https://github.com/jquery/jquery/commit/4a828c93d40eb67b2041b08bbed0f1973442bd03 which was stupid and got reversed. --- src/event.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/event.js b/src/event.js index f3a5d9f..a15603f 100644 --- a/src/event.js +++ b/src/event.js @@ -653,6 +653,12 @@ var withinElement = function( event ) { // Firefox sometimes assigns relatedTarget a XUL element // which we cannot access the parentNode property of try { + + // Chrome does something similar, the parentNode property + // can be accessed but is null. + if ( parent !== document && !parent.parentNode ) { + return; + } // Traverse up the tree while ( parent && parent !== this ) { parent = parent.parentNode; -- 1.7.10.4