Fix an issue with calling Event.pointer before the DOM is loaded. (kangax, jddalton) [#4 state:resolved]
This commit is contained in:
parent
b4ea2abda1
commit
9787801f06
|
@ -1,3 +1,5 @@
|
|||
* Fix an issue with calling Event.pointer before the DOM is loaded. (kangax, jddalton) [#4 state:resolved]
|
||||
|
||||
* Element#down on an input element should not raise error. (humeniuc, kangax)
|
||||
|
||||
* More unit tests for Object.isHash. (Tobie Langel)
|
||||
|
|
|
@ -86,7 +86,8 @@ Event.Methods = (function() {
|
|||
},
|
||||
|
||||
pointer: function(event) {
|
||||
var docElement = document.documentElement, body = document.body;
|
||||
var docElement = document.documentElement,
|
||||
body = document.body || { scrollLeft: 0, scrollTop: 0 };
|
||||
return {
|
||||
x: event.pageX || (event.clientX +
|
||||
(docElement.scrollLeft || body.scrollLeft) -
|
||||
|
|
Loading…
Reference in New Issue