Side navigation
#445 closed enhancement (fixed)
Opened November 28, 2006 04:41PM UTC
Closed November 30, 2006 08:39PM UTC
Last modified June 20, 2007 02:13AM UTC
normalise pageX/pageY
Reported by: | sam | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | core | Version: | |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
As Internet Explorer does not support pageX and pageY it would be useful if the properties could still be used. The workaround I use at the moment is:
if(!event.pageX) { event.pageX = event.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft); event.pageY = event.clientY + (document.documentElement.scrollTop || document.body.scrollTop); }
Works with no problems in IE7, Firefox 2 and Opera 8.5.
Attachments (0)
Change History (7)
Changed November 29, 2006 08:25PM UTC by comment:1
Changed November 29, 2006 09:45PM UTC by comment:2
This would be very helpful indeed
Changed November 29, 2006 09:49PM UTC by comment:3
If I had a dollar for everytime I have written this function....
I think this should be added to 1.1
Changed November 30, 2006 02:13AM UTC by comment:4
good
Changed November 30, 2006 07:48AM UTC by comment:5
Very nice! I'm definitely for it.
Changed November 30, 2006 04:48PM UTC by comment:6
Yes please :)
Changed November 30, 2006 08:39PM UTC by comment:7
resolution: | → fixed |
---|---|
status: | new → closed |
Fixed in SVN.
Is there any browser apart from IE that doesn't provide pageX natively?
I'd rewrite the code a little: