From f5a2db89fddf65f753b50ff7e77eab47db3b1f23 Mon Sep 17 00:00:00 2001 From: Brandon Aaron Date: Fri, 11 May 2007 21:39:38 +0000 Subject: [PATCH] Clean up in jQuery.event.fix (#1171) --- src/event/event.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event/event.js b/src/event/event.js index eb6ee59..84cddd3 100644 --- a/src/event/event.js +++ b/src/event/event.js @@ -188,9 +188,9 @@ jQuery.event = { // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == undefined && event.clientX != undefined ) { - var e = document.documentElement, b = document.body; - event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft); - event.pageY = event.clientY + (e.scrollTop || b.scrollTop); + var e = document.documentElement || document.body; + event.pageX = event.clientX + e.scrollLeft; + event.pageY = event.clientY + e.scrollTop; } // check if target is a textnode (safari) -- 1.7.10.4