#13997 closed bug (fixed)
stopImmediatePropagation doesn't stop DOM added event listeners
Reported by: | Owned by: | dmethvin | |
---|---|---|---|
Priority: | low | Milestone: | 1.11.1/2.1.1 |
Component: | event | Version: | 1.10.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Calling stopImmediatePropagation()
will correctly stop other handlers set on the element from firing, but only those added with jQuery. Other handlers added with addEventListener()
will still fire.
To stop all immediate propagation from within a jQuery event handler, one must call both:
event.stopImmediatePropagation(); event.originalEvent.stopImmediatePropagation();
Calling stopImmediatePropagation()
on the jQuery event object should call it on the underlying DOM event object.
Change History (7)
comment:1 Changed 10 years ago by
Component: | unfiled → event |
---|---|
Milestone: | None → 1.10.2/2.0.3 |
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 10 years ago by
Milestone: | 1.10.2/2.0.3 → 1.next |
---|
comment:4 Changed 10 years ago by
Milestone: | 1.next → 1.next/2.next |
---|
comment:5 Changed 9 years ago by
Milestone: | 1.next/2.next → 1.11.1/2.1.1 |
---|---|
Owner: | set to dmethvin |
Status: | open → assigned |
comment:6 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Event: Call underlying stopImmediatePropagation when present
Fixes #13997
Changeset: 6a89db86ed817f6a7498076e2a06b90f9fce0831
comment:7 Changed 9 years ago by
Summary: | stopImmediatePropagation doesn't stop DOM added event listenders → stopImmediatePropagation doesn't stop DOM added event listeners |
---|
Note: See
TracTickets for help on using
tickets.
Yep, seems to have been that way forever. Note that there is no way to stop immediate propagation in oldIE so this will introduce a difference in behavior of non-jQuery events in oldIE vs other browsers. (Perhaps consistency is why it was there?) It doesn't affect the 2.x branch due to its browser support list but it does affect 1.x.