Fix for #1322
This commit is contained in:
parent
2e0c87cf23
commit
e290083c35
|
@ -226,9 +226,9 @@ jQuery.event = {
|
||||||
|
|
||||||
// Calculate pageX/Y if missing and clientX/Y available
|
// Calculate pageX/Y if missing and clientX/Y available
|
||||||
if ( event.pageX == null && event.clientX != null ) {
|
if ( event.pageX == null && event.clientX != null ) {
|
||||||
var e = document.documentElement || document.body;
|
var e = document.documentElement, b = document.body;
|
||||||
event.pageX = event.clientX + e.scrollLeft;
|
event.pageX = event.clientX + (e && e.scrollLeft || b && b.scrollLeft);
|
||||||
event.pageY = event.clientY + e.scrollTop;
|
event.pageY = event.clientY + (e && e.scrollTop || b && b.scrollTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add which for key events
|
// Add which for key events
|
||||||
|
|
Loading…
Reference in a new issue