Stopping event propagation should not cancel system event group handlers

RESOLVED FIXED

Status

()

Core
DOM: Events
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Brian Ryner (not reading), Assigned: Brian Ryner (not reading))

Tracking

({fixed1.4.1})

Trunk
fixed1.4.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

111 bytes, text/html
Details
875 bytes, patch
Christopher Aillon (sabbatical, not receiving bugmail)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
If you cancel an event by calling event.stopPropagation(),
event.preventBubble(), event.preventCapture(), or event.cancelBubble = true,
then we incorrectly apply that to the system event group as well.  This violates
section 1.2.2.6 of the DOM3 Events spec, which says that stopping propagation in
one event group cannot affect propagation in other event groups.  Besides that,
it leads to some nasty problems, which my testcase will demonstrate.
(Assignee)

Comment 1

14 years ago
Created attachment 129836 [details]
testcase

You should be able to type in the text field on this page, but you can't.
(Assignee)

Comment 2

14 years ago
Created attachment 129837 [details] [diff] [review]
patch

Clear the STOP_DISPATCH flag before beginning the second event pass.
(Assignee)

Updated

14 years ago
Attachment #129837 - Flags: superreview?(jst)
Attachment #129837 - Flags: review?(caillon)
Comment on attachment 129837 [details] [diff] [review]
patch

sr=jst
Attachment #129837 - Flags: superreview?(jst) → superreview+
Attachment #129837 - Flags: review?(caillon) → review+
(Assignee)

Comment 4

14 years ago
Comment on attachment 129837 [details] [diff] [review]
patch

Can I get this in for 1.5b?  It's a pretty safe fix.
Attachment #129837 - Flags: approval1.5b?

Comment 5

14 years ago
Comment on attachment 129837 [details] [diff] [review]
patch

a=mkaply for trunk and branch

Thanks for finding this
Attachment #129837 - Flags: approval1.5b?
Attachment #129837 - Flags: approval1.5b+
Attachment #129837 - Flags: approval1.4.x+
(Assignee)

Comment 6

14 years ago
Checked in on trunk and 1.4 branch.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Keywords: fixed1.4.1
Resolution: --- → FIXED

Updated

14 years ago
Blocks: 224532
You need to log in before you can comment on or make changes to this bug.