Bug Tracker

Ticket #7432 (closed bug: worksforme)

Opened 4 years ago

Last modified 3 years ago

.undelegate() doesnt clear up properly

Reported by: dunkfordyce@… Owned by:
Priority: low Milestone: 1.5
Component: event Version: 1.4.3
Keywords: undelegate clear up Cc:
Blocking: Blocked by:

Description

Found this while delegating and undelegating alot - it appears there is some data left on the delegating element after .undelegate() - you have to call unbind() as well to truly clear all the data on the element.

This example demonstrates the problem - you can see the length of the click data goes up continuously for each delegate() call:  http://jsbin.com/ehani4/4/edit

Change History

comment:1 Changed 4 years ago by jitter

Looks like you specified the wrong version on the ticket (1.4.3). In the test case you linked too you are actually using 1.4.2.

This bug has already been fixed in 1.4.3 (at least for me switching to 1.4.3 in your test case fixed it in Opera, FF and Chrome).

Last edited 4 years ago by jitter (previous) (diff)

comment:2 Changed 4 years ago by anonymous

ah yes - i can confirm it has. sorry for the noise.

comment:3 Changed 4 years ago by addyosmani

  • Keywords undelegate clear up added
  • Priority changed from undecided to low
  • Status changed from new to closed
  • Component changed from unfiled to event
  • Resolution set to worksforme

As mentioned, the test case you provided was linking to jQuery 1.4.2 and this bug has been addressed in 1.4.3. It should work fine now.

Note: See TracTickets for help on using tickets.