Bug Tracker

Modify

Ticket #1889 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

IE error in event.fix

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

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

comment:1 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to fixed

This is fixed in the latest svn

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.