Bug Tracker

Ticket #1171 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

Bug in event-handling code

Reported by: IGx89 Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.1.3 Component: event
Version: 1.1.2 Keywords:
Cc: Needs: Review

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

Attachments

Change History

Changed 1 year ago by brandon

  • status changed from new to closed
  • resolution set to fixed

Fixed in Rev [1886].

Note: See TracTickets for help on using tickets.