Skip to content
Permalink
Browse files

Make sure that mousing over Chrome "internal div" doesn't trigger a m…

…ouseleave. Fixes #8209.

Follow up to 4a828c9
which was stupid and got reversed.
  • Loading branch information
jitter committed Feb 8, 2011
1 parent 944e0e6 commit b46dff39c35ae05f92f6909ff8d07aa470e4a8d4
Showing with 6 additions and 0 deletions.
  1. +6 −0 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;

2 comments on commit b46dff3

@jfirebaugh

This comment has been minimized.

Copy link

jfirebaugh replied Mar 7, 2011

This causes a mouseenter event to get lost if parent is null. The condition should be parent && parent !== document && !parent.parentNode.

@jfirebaugh

This comment has been minimized.

Please sign in to comment.
You can’t perform that action at this time.