Clean up in jQuery.event.fix (#1171)
This commit is contained in:
parent
c76f6cd125
commit
f5a2db89fd
|
@ -188,9 +188,9 @@ jQuery.event = {
|
||||||
|
|
||||||
// Calculate pageX/Y if missing and clientX/Y available
|
// Calculate pageX/Y if missing and clientX/Y available
|
||||||
if ( event.pageX == undefined && event.clientX != undefined ) {
|
if ( event.pageX == undefined && event.clientX != undefined ) {
|
||||||
var e = document.documentElement, b = document.body;
|
var e = document.documentElement || document.body;
|
||||||
event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
|
event.pageX = event.clientX + e.scrollLeft;
|
||||||
event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
|
event.pageY = event.clientY + e.scrollTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if target is a textnode (safari)
|
// check if target is a textnode (safari)
|
||||||
|
|
Loading…
Reference in a new issue