Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7432 closed bug (worksforme)

.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:
Blocked by: Blocking:

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

comment:1 Changed 6 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 6 years ago by jitter (previous) (diff)

comment:2 Changed 6 years ago by anonymous

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

comment:3 Changed 6 years ago by addyosmani

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

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.