Bug Tracker

Modify

Ticket #1279 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

IE event cleanup problem

Reported by: dmethvin Owned by:
Priority: critical Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocking: Blocked by:

Description

If an event handler is attached and later detached from an element, the jQuery.event.global[type][index] element will be undefined as it was delete-ed out of the array. The IE cleanup code needs to check for that and skip the call to remove the event. Otherwise it crashes on the element.$events reference in jQuery.event.remove since element is undefined.

This fixed the problem for me.

 http://dev.jquery.com/browser/trunk/jquery/src/event/event.js#L994

< jQuery.event.remove(els[i-1], type);
> els[i-1] && jQuery.event.remove(els[i-1], type);

Sorry I don't have a simple test case, I found this while resurrecting work on the splitter.

Change History

comment:1 Changed 6 years ago by brandon

  • Priority changed from major to critical

Marking this as critical so that we get it into the 1.1.3 release

comment:2 Changed 6 years ago by brandon

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

Fixed in Rev [2136].

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.