fix for #2620
This commit is contained in:
parent
a4b8fed8ad
commit
c6db93c373
|
@ -351,8 +351,8 @@ 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 doc = document.documentElement, body = document.body;
|
var doc = document.documentElement, body = document.body;
|
||||||
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
|
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
|
||||||
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
|
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add which for key events
|
// Add which for key events
|
||||||
|
|
Loading…
Reference in a new issue