diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2012-12-26 17:29:17 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-12-26 17:35:55 -0500 |
commit | 69bab50296f945de1da3d0e75992a8210bc5427c (patch) | |
tree | a0386589da0d7c7130ab2d3a59cf1d171e673740 /src/event.js | |
parent | 97fa97f0c1cd6a14a0d7f5e2599b30c502bd3e8c (diff) | |
download | jquery-69bab50296f945de1da3d0e75992a8210bc5427c.tar.gz jquery-69bab50296f945de1da3d0e75992a8210bc5427c.zip |
Remove obsolete event object fixups.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/event.js b/src/event.js index 6c6a51678..f49438106 100644 --- a/src/event.js +++ b/src/event.js @@ -434,11 +434,10 @@ jQuery.event = { }, mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; + button = original.button; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { @@ -450,11 +449,6 @@ jQuery.event = { event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { @@ -483,19 +477,6 @@ jQuery.event = { event[ prop ] = originalEvent[ prop ]; } - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; }, |