Opened 9 years ago
Closed 9 years ago
#9951 closed bug (fixed)
Wrong order in .trigger() when DOM is modified in a handler
| Reported by: | dmethvin | Owned by: | dmethvin |
|---|---|---|---|
| Priority: | low | Milestone: | 1.7 |
| Component: | event | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
The W3C DOM Event Model spec (http://www.w3.org/TR/DOM-Level-3-Events/#event-flow) says browsers are supposed to calculate the event propagation path in advance, so that modifications to the DOM in a handler does not affect the path. Although the liveHandler method attempts this for delegated events, .trigger() does not.
http://jsfiddle.net/dmethvin/rGyJ3/
There are still some situations where delegated events may yield a different path than directly attached ones; need to document that.
Change History (2)
comment:1 Changed 9 years ago by
| Component: | unfiled → event |
|---|---|
| Milestone: | None → 1.7 |
| Owner: | set to dmethvin |
| Priority: | undecided → low |
| Status: | new → assigned |
comment:2 Changed 9 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.

Fix #9951. Precompute path for
.trigger()to match up with W3C spec.