mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-20 19:33:08 +09:00
Issue #2532 - Align dialog submission triggered by form.submit() with the spec.
Submission in click handler of submit button should not be deferred per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submit-dialog See Bug 1719872
This commit is contained in:
parent
b6d077bbbb
commit
1db268ef50
1 changed files with 11 additions and 10 deletions
|
|
@ -676,16 +676,6 @@ HTMLFormElement::DoSubmit(WidgetEvent* aEvent)
|
|||
|
||||
mSubmitInitiatedFromUserInput = EventStateManager::IsHandlingUserInput();
|
||||
|
||||
if(mDeferSubmission) {
|
||||
// we are in an event handler, JS submitted so we have to
|
||||
// defer this submission. let's remember it and return
|
||||
// without submitting
|
||||
mPendingSubmission = submission;
|
||||
// ensure reentrancy
|
||||
mIsSubmitting = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//
|
||||
// perform the submission
|
||||
//
|
||||
|
|
@ -709,6 +699,17 @@ HTMLFormElement::DoSubmit(WidgetEvent* aEvent)
|
|||
submission->GetAsDialogSubmission()) {
|
||||
return SubmitDialog(dialogSubmission);
|
||||
}
|
||||
|
||||
if(mDeferSubmission) {
|
||||
// we are in an event handler, JS submitted so we have to
|
||||
// defer this submission. let's remember it and return
|
||||
// without submitting
|
||||
mPendingSubmission = submission;
|
||||
// ensure reentrancy
|
||||
mIsSubmitting = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return SubmitSubmission(submission);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue