mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix the special event handler for mouseover/out events.
And use the /dist version of jquery.js, willya?
This commit is contained in:
parent
8ba5010ac2
commit
0ec71ac707
@ -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 );
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Hover tests</title>
|
||||
<script src="http://code.jquery.com/jquery-1.6.2.js" type='text/javascript'></script>
|
||||
<script src="../dist/jquery.js" type='text/javascript'></script>
|
||||
<style>
|
||||
/* Remove body dimensions so we can test enter/leave to surrounding browser chrome */
|
||||
body, html {
|
||||
|
Loading…
Reference in New Issue
Block a user