Skip to main content

Bug Tracker

Side navigation

#9951 closed bug (fixed)

Opened August 01, 2011 02:43PM UTC

Closed September 19, 2011 07:43PM UTC

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.

Attachments (0)
Change History (2)

Changed August 01, 2011 02:43PM UTC by dmethvin comment:1

component: unfiledevent
milestone: None1.7
owner: → dmethvin
priority: undecidedlow
status: newassigned

Changed September 19, 2011 07:43PM UTC by Dave Methvin comment:2

resolution: → fixed
status: assignedclosed

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

Changeset: ecd10464e8659b008e52161cc029f9d6863e33b3