Bug Tracker

Modify

Ticket #1171 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Bug in event-handling code

Reported by: IGx89 Owned by:
Priority: major Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocking: Blocked by:

Description

// Calculate pageX/Y if missing and clientX/Y available
if ( event.pageX == undefined && event.clientX != undefined ) {
     var e = document.documentElement, b = document.body;
     event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
     event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
}

If documentElement exists (instead of body) and it's scrollLeft is 0, it will try to access the scrollLeft value of b (which is null) and throw an error.

Finder: Jack Slocum, Ext JS development team Source:  http://www.extjs.com/forum/showthread.php?t=6044

Change History

comment:1 Changed 6 years ago by brandon

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

Fixed in Rev [1886].

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.