Ticket #7793 (closed bug: fixed)
$.fn.delegate does not reflect event.preventdefault() from earlier $.fn.bind
|Reported by:||rjgotten||Owned by:||dmethvin|
When an event has its default behaviour prevented in a handler added with $.fn.bind(), a handler higher up the hierarchy added with $.fn.delegate() reports that the event does not have its default behaviour prevented.
Provided is a jsFiddle illustrating the issue:
- The bound handler executes.
- The event's default behaviour is prevented.
- A reference to the event object is retained.
- The delegated handler executes.
- The event's status is checked with isDefaultPrevented(). It returns false.
- The reference to the event object is compared with the retained reference from the bound handler. The event objects are not the same event.
comment:1 Changed 5 years ago by dmethvin
- Component changed from unfiled to event
- Milestone changed from 1.next to 1.5
- Owner set to dmethvin
- Priority changed from undecided to low
- Status changed from new to assigned
comment:2 Changed 5 years ago by dmethvin
- Summary changed from $.fn.delegate does not honor event.preventdefault() from earlier $.fn.bind to $.fn.delegate does not reflect event.preventdefault() from earlier $.fn.bind
comment:3 Changed 5 years ago by Dave Methvin
- Resolution set to fixed
- Status changed from assigned to closed