Modify ↓
Ticket #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: | |
| 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:3 Changed 3 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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).