From: Anton M Date: Tue, 8 Feb 2011 15:57:06 +0000 (+0100) Subject: Make sure that mousing over Chrome "internal div" elements results in no trigger... X-Git-Tag: 1.5.1rc1~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4a828c93d40eb67b2041b08bbed0f1973442bd03;p=jquery.git Make sure that mousing over Chrome "internal div" elements results in no trigger of a mouseleave. Fixes #8209. --- diff --git a/src/event.js b/src/event.js index f3a5d9f49..a17cf8947 100644 --- a/src/event.js +++ b/src/event.js @@ -652,13 +652,15 @@ var withinElement = function( event ) { // Firefox sometimes assigns relatedTarget a XUL element // which we cannot access the parentNode property of + // Chrome does something similar, the parentNode property + // can be accessed but is null. try { // Traverse up the tree while ( parent && parent !== this ) { parent = parent.parentNode; } - if ( parent !== this ) { + if ( parent && parent !== this ) { // set the correct event type event.type = event.data;