Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 177683004: Don't delay submit in onsubmit event handler (Closed)

Created:
6 years, 10 months ago by Habib Virji
Modified:
6 years, 9 months ago
Reviewers:
keishi, tkent
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Value set in form submission depends on return value of onSubmit OnSubmit is cancellable i.e. if return false or defaultPrevented, it should abort form submission. Allows cancelling or proceeding depending onSubmit value as well handles form submission from JS. R=tkent, keishi1 BUG=196640 TEST=Submitted values differs on return type of onsubmit. If true, changed values are sent. If false it aborts form submission. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169185

Patch Set 1 #

Total comments: 14

Patch Set 2 : Send form data at time of method invocation #

Total comments: 4

Patch Set 3 : Corrected indentation #

Patch Set 4 : Updated to latest master #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -6 lines) Patch
A LayoutTests/fast/forms/form-submission-cancelable.html View 1 2 1 chunk +57 lines, -0 lines 1 comment Download
A + LayoutTests/fast/forms/form-submission-cancelable-expected.txt View 1 1 chunk +6 lines, -4 lines 0 comments Download
M Source/core/html/HTMLFormElement.cpp View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Habib Virji
As raised in the bug, value BBB was sent instead of AAA as sent by ...
6 years, 10 months ago (2014-02-24 14:38:59 UTC) #1
keishi
> Setting m_isSubmittingOrPreparingForSubmission before dispatchEvent allow JS > submit to be trigger as done in ...
6 years, 10 months ago (2014-02-25 15:00:57 UTC) #2
Habib Virji
Thanks for reviewing. 1. I might have missed then. I was looking for whether form ...
6 years, 10 months ago (2014-02-25 15:26:40 UTC) #3
keishi
> 1. I might have missed then. I was looking for whether form gets submitted ...
6 years, 10 months ago (2014-02-26 03:50:16 UTC) #4
Habib Virji
On 2014/02/26 03:50:16, keishi1 wrote: > > 1. I might have missed then. I was ...
6 years, 10 months ago (2014-02-26 17:17:08 UTC) #5
keishi
On 2014/02/26 17:17:08, Habib Virji wrote: > On 2014/02/26 03:50:16, keishi1 wrote: > > > ...
6 years, 9 months ago (2014-02-28 09:47:49 UTC) #6
keishi
https://codereview.chromium.org/177683004/diff/1/LayoutTests/fast/forms/form-submission-cancelable.html File LayoutTests/fast/forms/form-submission-cancelable.html (right): https://codereview.chromium.org/177683004/diff/1/LayoutTests/fast/forms/form-submission-cancelable.html#newcode12 LayoutTests/fast/forms/form-submission-cancelable.html:12: console.log(query.indexOf('query=AAA') == 1); We should use js-test.js shouldBe* methods ...
6 years, 9 months ago (2014-02-28 10:57:48 UTC) #7
Habib Virji
Thanks keishi was useful comments. Updated as suggested. https://codereview.chromium.org/177683004/diff/1/LayoutTests/fast/forms/form-submission-cancelable.html File LayoutTests/fast/forms/form-submission-cancelable.html (right): https://codereview.chromium.org/177683004/diff/1/LayoutTests/fast/forms/form-submission-cancelable.html#newcode12 LayoutTests/fast/forms/form-submission-cancelable.html:12: console.log(query.indexOf('query=AAA') ...
6 years, 9 months ago (2014-03-04 14:37:52 UTC) #8
Habib Virji
@keishi1 are the changes okay?
6 years, 9 months ago (2014-03-06 16:03:39 UTC) #9
keishi
Thanks. LGTM. https://codereview.chromium.org/177683004/diff/30001/LayoutTests/fast/forms/form-submission-cancelable.html File LayoutTests/fast/forms/form-submission-cancelable.html (right): https://codereview.chromium.org/177683004/diff/30001/LayoutTests/fast/forms/form-submission-cancelable.html#newcode17 LayoutTests/fast/forms/form-submission-cancelable.html:17: <script> nit: No indent inside <script> tag. ...
6 years, 9 months ago (2014-03-07 01:56:31 UTC) #10
Habib Virji
Thanks. Corrected indentation and quotes. https://codereview.chromium.org/177683004/diff/30001/LayoutTests/fast/forms/form-submission-cancelable.html File LayoutTests/fast/forms/form-submission-cancelable.html (right): https://codereview.chromium.org/177683004/diff/30001/LayoutTests/fast/forms/form-submission-cancelable.html#newcode17 LayoutTests/fast/forms/form-submission-cancelable.html:17: <script> On 2014/03/07 01:56:31, ...
6 years, 9 months ago (2014-03-07 09:12:34 UTC) #11
Habib Virji
The CQ bit was checked by habib.virji@samsung.com
6 years, 9 months ago (2014-03-09 16:52:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/177683004/40001
6 years, 9 months ago (2014-03-09 16:52:26 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-09 17:27:14 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel
6 years, 9 months ago (2014-03-09 17:27:15 UTC) #15
Habib Virji
@tkent: can you have a look if changes are ok?
6 years, 9 months ago (2014-03-10 10:37:53 UTC) #16
Habib Virji
@tkent: can you have a look. the failure on bot is not due to added ...
6 years, 9 months ago (2014-03-13 14:27:29 UTC) #17
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-13 14:32:03 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/177683004/60001
6 years, 9 months ago (2014-03-13 14:32:15 UTC) #19
Habib Virji
On 2014/03/13 14:32:03, tkent wrote: > The CQ bit was checked by mailto:tkent@chromium.org Thanks
6 years, 9 months ago (2014-03-13 15:03:25 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 15:21:15 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_blink_rel
6 years, 9 months ago (2014-03-13 15:21:16 UTC) #22
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-13 23:29:57 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/177683004/60001
6 years, 9 months ago (2014-03-13 23:30:08 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 23:30:50 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_blink_rel
6 years, 9 months ago (2014-03-13 23:30:51 UTC) #26
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-13 23:32:27 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/177683004/60001
6 years, 9 months ago (2014-03-13 23:32:39 UTC) #28
commit-bot: I haz the power
Change committed as 169185
6 years, 9 months ago (2014-03-14 00:15:50 UTC) #29
tkent
6 years, 9 months ago (2014-03-17 06:39:19 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/177683004/diff/60001/LayoutTests/fast/forms/f...
File LayoutTests/fast/forms/form-submission-cancelable.html (right):

https://codereview.chromium.org/177683004/diff/60001/LayoutTests/fast/forms/f...
LayoutTests/fast/forms/form-submission-cancelable.html:46:
document.getElementById('submitButton').click();
Form submission and load events are asynchronous. We can't expect that the order
of load events follows the click order.

Powered by Google App Engine
This is Rietveld 408576698