diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-09-07 22:49:32 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-09-19 15:42:31 -0400 |
commit | 0ec71ac707fc3edce6ee67a54da6c779164812f4 (patch) | |
tree | 3bf8a36c376b2a0af73f986cf186350b0a50700b /src | |
parent | 8ba5010ac2cf7f78fd46aacffda2257ddbe953f1 (diff) | |
download | jquery-0ec71ac707fc3edce6ee67a54da6c779164812f4.tar.gz jquery-0ec71ac707fc3edce6ee67a54da6c779164812f4.zip |
Fix the special event handler for mouseover/out events.
And use the /dist version of jquery.js, willya?
Diffstat (limited to 'src')
-rw-r--r-- | src/event.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js index 2b05d9a64..fc43ed1ae 100644 --- a/src/event.js +++ b/src/event.js @@ -717,11 +717,13 @@ jQuery.each({ selector = handleObj.selector, oldType, ret; + // NB: No relatedTarget if the mouse left/entered the browser window if ( selector && related ) { // Delegated event; find the real relatedTarget related = jQuery( related ).closest( selector )[0]; } - if ( !related || related !== target && !jQuery.contains( target, related ) ) { + // For mouseover/out, contains isn't needed; handle() already determined it's the right target + if ( !related || handleObj.origType === event.type || (related !== target && !jQuery.contains( target, related )) ) { oldType = event.type; event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); |