Clicking a button to submit a disconnected form should not fire submit events |
|||
Issue description
,
May 17 2017
,
May 17 2017
Yeah, it's true nobody passes the test right now. However, we thought it was best to keep the spec as-is, because nobody submits disconnected forms to the server, and it makes no sense to fire a submit event if you're later not going to submit the form. In other words, it is better to abort before firing the submit event, if you are disconnected, instead of waiting until after.
,
May 19 2017
> it makes no sense to fire a submit event if you're later not going to submit the form. I agree. We already counted disconnected form submission, and it's very low. The behavior change should be ok. https://bugs.chromium.org/p/chromium/issues/detail?id=586749#c10
,
May 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cad664141c2aed77dd0049928c1c9d004cce72a0 commit cad664141c2aed77dd0049928c1c9d004cce72a0 Author: shanmuga.m <shanmuga.m@samsung.com> Date: Wed May 24 23:40:29 2017 Clicking a button on disconnected form should not fire submit event. Add a isConnected() check in HTMLFormElement::PrepareForSubmission to avoid firing the submit events. BUG= 723004 Review-Url: https://codereview.chromium.org/2900943002 Cr-Commit-Position: refs/heads/master@{#474476} [modify] https://crrev.com/cad664141c2aed77dd0049928c1c9d004cce72a0/third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-dispatch-click-expected.txt [delete] https://crrev.com/a0646d775e805babb8d6949f955071011df709f2/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-button-element/button-click-submits-expected.txt [modify] https://crrev.com/cad664141c2aed77dd0049928c1c9d004cce72a0/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
,
May 25 2017
I filed a related specification issue. https://github.com/whatwg/html/issues/2708 |
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, May 17 2017Status: Available (was: Untriaged)