You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chrome, Firefox, and Safari have a reentrancy protection for submit event. That is to say, they don't allow starting form submission algorithm without submitted from submit() method flag in submit event handlers.
Clicking the first submit button in the following HTML dispatches just one submit event, and click() call does nothing.
On the other hand, f.submit() in submit event should not be ignored.
A possible solution:
has in-submit-event flag, initially false.
It should be set to true before firing submit event, and reset to false after it.
Add "If the submitted from() method flag is not set and in-submit-event flag is true, then return." before step 6 of form submission algorithm.
Note: Edge dispatches two submit events in the example case. It might have a different reentrancy protection.
Fixes#4620. This flag prevents reentrancy into the submission algorithm
during submit or invalid events. Blink and Gecko implement this for
submit only; WebKit implements it for both. The specification chooses
WebKit's behavior.
Tests: web-platform-tests/wpt#16811
Specification: Form submission algorithm
Found in #4597
Chrome, Firefox, and Safari have a reentrancy protection for
submit
event. That is to say, they don't allow starting form submission algorithm without submitted from submit() method flag insubmit
event handlers.Clicking the first submit button in the following HTML dispatches just one
submit
event, andclick()
call does nothing.On the other hand,
f.submit()
insubmit
event should not be ignored.A possible solution:
Note: Edge dispatches two
submit
events in the example case. It might have a different reentrancy protection.The text was updated successfully, but these errors were encountered: