Ticket #12203 (closed bug: fixed)
.undelegate() with no arguments unbinds all handlers from the parent element
| Reported by: | adavis@… | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.8 |
| Component: | event | Version: | 1.7.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
This used to work in 1.6. undelegate() has a zero-argument version that should just undelegate all handlers from the parent element. What this does now is undelegate all handlers AS WELL as all bound event handlers on the parent.
See the following jsFiddle for an example: http://jsfiddle.net/xWju3/
Clicking on the div should display "Parent Clicked", and clicking on the "Click Me" button should display "Child Clicked". If you then click on the "Undelegate Click" button, neither the "Click Me" button nor the parent div will register their clicks anymore.
Change History
comment:1 Changed 11 months ago by dmethvin
- Priority changed from undecided to blocker
- Status changed from new to open
- Component changed from unfiled to event
- Milestone changed from None to 1.8
comment:2 Changed 11 months ago by Dave Methvin
- Status changed from open to closed
- Resolution set to fixed
Fix #12203. .undelegate() should not remove direcly bound events.
Changeset: 1d8bf0a2b57fd429c600aab5b150b2a04b87e451
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Yep, we'll get a fix in for this.