Clean up in jQuery.event.fix (#1171)

This commit is contained in:
Brandon Aaron 2007-05-11 21:39:38 +00:00
parent c76f6cd125
commit f5a2db89fd

View 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)