diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2016-05-04 21:36:11 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2016-05-06 15:32:12 -0400 |
commit | 931f45fc387d68cfce004f786330d18f74cf03e5 (patch) | |
tree | 1cacdaa7e6b93a7df4443fdf69481a2132128945 | |
parent | e61fccb9d736235b4b011f89cba6866bc0b8997d (diff) | |
download | jquery-931f45fc387d68cfce004f786330d18f74cf03e5.tar.gz jquery-931f45fc387d68cfce004f786330d18f74cf03e5.zip |
Event: Remove pageX/pageY fill for event object
Fixes gh-3092
CLoses gh-3106
IE8 was the last major browser missing these.
-rw-r--r-- | src/event.js | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/event.js b/src/event.js index ba2a9dca6..ffaec578d 100644 --- a/src/event.js +++ b/src/event.js @@ -592,6 +592,8 @@ jQuery.each( { detail: true, eventPhase: true, metaKey: true, + pageX: true, + pageY: true, shiftKey: true, view: true, "char": true, @@ -622,40 +624,6 @@ jQuery.each( { } return event.which; - }, - - pageX: function( event ) { - var eventDoc, doc, body; - - // Calculate pageX if missing and clientX available - if ( event.pageX == null && event.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - return event.clientX + - ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - } - - return event.pageX; - }, - - pageY: function( event ) { - var eventDoc, doc, body; - - // Calculate pageY if missing and clientY available - if ( event.pageY == null && event.clientY != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - return event.clientY + - ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - return event.pageY; } }, jQuery.event.addProp ); |