mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix for #1153
This commit is contained in:
parent
6e8a8c5359
commit
ee2efbe1e3
@ -266,8 +266,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 e = document.documentElement, b = document.body;
|
var e = document.documentElement, b = document.body;
|
||||||
event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
|
event.pageX = event.clientX + (e && e.scrollLeft || b && b.scrollLeft || 0);
|
||||||
event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
|
event.pageY = event.clientY + (e && e.scrollTop || b && b.scrollTop || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add which for key events
|
// Add which for key events
|
||||||
|
Loading…
Reference in New Issue
Block a user