Skip to content
Permalink
Browse files

Fix normalization of pageX and pageY event properties in IE (#1571). …

…Thanks wizzud.
  • Loading branch information
brandonaaron committed Oct 6, 2007
1 parent 92aac3a commit a5f95c88c1c58565f0707e6c21bdf1874938a9d3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/event.js
@@ -267,8 +267,8 @@ jQuery.event = {
// Calculate pageX/Y if missing and clientX/Y available
if ( event.pageX == null && event.clientX != null ) {
var doc = document.documentElement, body = document.body;
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0);
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0);
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientLeft || 0);
}

// Add which for key events

0 comments on commit a5f95c8

Please sign in to comment.
You can’t perform that action at this time.