Skip to main content

Bug Tracker

Side navigation

#1889 closed bug (fixed)

Opened November 04, 2007 04:57PM UTC

Closed November 14, 2007 05:05AM UTC

IE error in event.fix

Reported by: MajestiC Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:
Description

IE error in calculating pageX/Y if missing and clientX/Y available.

Current code:

// Calculate pageX/Y if missing and clientX/Y available

if ( event.pageX == null && event.clientX != null ) {

var e = document.documentElement, b = document.body;

event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);

event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);

}

Fixed code:

// Calculate pageX/Y if missing and clientX/Y available

if ( event.pageX == null && event.clientX != null ) {

var e = document.documentElement, b = document.body;

event.pageX = (event && event.clientX || 0) + (e && e.scrollLeft || b && b.scrollLeft || 0);

event.pageY = (event && event.clientY || 0) + (e && e.scrollTop || b && b.scrollTop || 0);

}

Attachments (0)
Change History (1)

Changed November 14, 2007 05:05AM UTC by brandon comment:1

resolution: → fixed
status: newclosed

This is fixed in the latest svn