This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19125 - Form "submit" event should bubble.
Summary: Form "submit" event should bubble.
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard: needs test
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 17:48 UTC by Yonathan Randolph
Modified: 2012-12-30 12:05 UTC (History)
3 users (show)

See Also:


Attachments

Description Yonathan Randolph 2012-09-28 17:48:57 UTC
In the form submission algorithm[1], the event step should be, "fire a simple event that **bubbles and** is cancelable named submit" The event bubbles according to DOM 2 Events[2], and this is consistent with all the browsers I tested (Chrome, Firefox, Opera)[3].

  [1]: http://www.whatwg.org/specs/web-apps/current-work/#form-submission-algorithm
  [2]: http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents-h3
  [3]: http://jsfiddle.net/yonran/WanrL/embedded/result/
Comment 1 Yonathan Randolph 2012-09-29 16:08:46 UTC
The submit and reset events actually don’t bubble in IE 8 or below according to quirksmode[1], and jQuery 1.4+ attaches click and keypress listeners to be simulate bubbling submit events. So the spec is currently descriptive of IE 8 but probably should proscribe the bubbling behavior.

  [1]: http://www.quirksmode.org/dom/events/submit.html
Comment 2 Ian 'Hixie' Hickson 2012-12-30 03:37:06 UTC
Thanks!
Comment 3 contributor 2012-12-30 03:38:28 UTC
Checked in as WHATWG revision r7609.
Check-in comment: Mostly, browsers seem to make these events bubble.
http://html5.org/tools/web-apps-tracker?from=7608&to=7609