Commit b46dff39 authored by Anton M's avatar Anton M

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.
parent 944e0e64
...@@ -653,6 +653,12 @@ var withinElement = function( event ) { ...@@ -653,6 +653,12 @@ var withinElement = function( event ) {
// Firefox sometimes assigns relatedTarget a XUL element // Firefox sometimes assigns relatedTarget a XUL element
// which we cannot access the parentNode property of // which we cannot access the parentNode property of
try { try {
// Chrome does something similar, the parentNode property
// can be accessed but is null.
if ( parent !== document && !parent.parentNode ) {
return;
}
// Traverse up the tree // Traverse up the tree
while ( parent && parent !== this ) { while ( parent && parent !== this ) {
parent = parent.parentNode; parent = parent.parentNode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment