prototype: Fix Event#pointer in IE standard mode. Closes #9920.

This commit is contained in:
Tobie Langel 2008-03-19 07:01:49 +00:00
parent 6a2d81ce62
commit 32b1b6b7cd
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,5 @@
* Fix Event#pointer in IE standard mode. Closes #9920. [kangax, Tobie Langel]
* Instanciate Test.Unit.Logger on window load. [Tobie Langel]
* Unit tests clean-up. [Tobie Langel]

View File

@ -71,11 +71,14 @@ Event.Methods = (function() {
},
pointer: function(event) {
var docElement = document.documentElement, body = document.body;
return {
x: event.pageX || (event.clientX +
(document.documentElement.scrollLeft || document.body.scrollLeft)),
(docElement.scrollLeft || body.scrollLeft) -
(docElement.clientLeft || 0)),
y: event.pageY || (event.clientY +
(document.documentElement.scrollTop || document.body.scrollTop))
(docElement.scrollTop || body.scrollTop) -
(docElement.clientTop || 0))
};
},