Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1889 closed bug (fixed)

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 event.pageY = event.clientY + (e && e.scrollTop
b.scrollLeft 0);
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 event.pageY = (event && event.clientY
0) + (e && e.scrollLeft b && b.scrollLeft 0);
0) + (e && e.scrollTop b && b.scrollTop 0);

}

Change History (1)

comment:1 Changed 13 years ago by brandon

Resolution: fixed
Status: newclosed

This is fixed in the latest svn

Note: See TracTickets for help on using tickets.