[webkit-changes] [WebKit/WebKit] b1875e: Fix Form Submit incorrect query
Alexsander Borges Damaceno
noreply at github.com
Sun Oct 20 21:43:07 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b1875e2b51b39bd75a81f83e9a3b3aa1e9291091
https://github.com/WebKit/WebKit/commit/b1875e2b51b39bd75a81f83e9a3b3aa1e9291091
Author: Alexsander Borges Damaceno <alexbdamac at gmail.com>
Date: 2024-10-20 (Sun, 20 Oct 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-preventdefault-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-requestsubmit-expected.txt
M Source/WebCore/html/HTMLFormElement.cpp
Log Message:
-----------
Fix Form Submit incorrect query
https://bugs.webkit.org/show_bug.cgi?id=243595
Reviewed by Ryosuke Niwa.
When we submit a form and call submit() again in JavaScript code
that was called, for example, from onsubmit, we lose this submit
event. This happens because some control flags were activated
in the normal submit event and the form was already processing a
submit event generated by the user clicking the submit button.
To solve this problem, the change is:
- Checking if the form submit event is coming from JavaScript code and allowing the event to complete and reset the flags related with form submit.
* Source/WebCore/html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submit):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-preventdefault-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-requestsubmit-expected.txt:
Canonical link: https://commits.webkit.org/285498@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list