From 32b1b6b7cd972c6e24d5c33eff7dbed448bd1fd8 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Wed, 19 Mar 2008 07:01:49 +0000 Subject: [PATCH] prototype: Fix Event#pointer in IE standard mode. Closes #9920. --- CHANGELOG | 2 ++ src/event.js | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 69dbad7..75dd48f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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] diff --git a/src/event.js b/src/event.js index 589a718..a271abe 100644 --- a/src/event.js +++ b/src/event.js @@ -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)) }; },