Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1171 closed bug (fixed)

Bug in event-handling code

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

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 (1)

comment:1 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed

Fixed in Rev [1886].

Note: See TracTickets for help on using tickets.