Fix an issue with calling Event.pointer before the DOM is loaded. (kangax, jddalton) [#4 state:resolved]

This commit is contained in:
Andrew Dupont 2008-04-24 14:00:03 -05:00 committed by Tobie Langel
parent b4ea2abda1
commit 9787801f06
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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) -