Skip to content
Browse files

Edited src/event.js via GitHub

  • Loading branch information...
1 parent e2bace8 commit 627016acd62c2db5ec9b6660f35f538201db1de9 @cmc3cn committed Apr 29, 2011
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/event.js
View
7 src/event.js
@@ -1134,14 +1134,9 @@ function liveHandler( event ) {
if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
event.type = handleObj.preType;
related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
-
- // Make sure not to accidentally match a child element with the same selector
- if ( related && jQuery.contains( elem, related ) ) {
- related = elem;
- }
}
- if ( !related || related !== elem ) {
+ if ( !related || related !== elem && !jQuery.contains( elem, related ) ) {
elems.push({ elem: elem, handleObj: handleObj, level: close.level });
}
}

0 comments on commit 627016a

Please sign in to comment.
Something went wrong with that request. Please try again.