]> source.dussan.org Git - jquery.git/commitdiff
Clean up in jQuery.event.fix (#1171)
authorBrandon Aaron <brandon.aaron@gmail.com>
Fri, 11 May 2007 21:39:38 +0000 (21:39 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Fri, 11 May 2007 21:39:38 +0000 (21:39 +0000)
src/event/event.js

index eb6ee59174028c054f3d787044d92b4adc71f602..84cddd355e020a197f85362d720960a54a329534 100644 (file)
@@ -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)