Skip to content

Commit

Permalink
Make sure that mousing over Chrome "internal div" doesn't trigger a m…
Browse files Browse the repository at this point in the history
…ouseleave. Fixes #8209.

Follow up to jquery@4a828c9
which was stupid and got reversed.
  • Loading branch information
jitter committed Feb 8, 2011
1 parent 944e0e6 commit b46dff3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/event.js
Expand Up @@ -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;
Expand Down

0 comments on commit b46dff3

Please sign in to comment.