mirror of
https://github.com/jquery/jquery.git
synced 2026-02-08 02:45:08 -05:00
Fix the special event handler for mouseover/out events.
And use the /dist version of jquery.js, willya?
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user