Verified Commit 6b68c8bc authored by Olli Pettay's avatar Olli Pettay Committed by ma1
Browse files

Bug 2054643, make button's EndSubmitClick handling consistent with input...

Bug 2054643, make button's EndSubmitClick handling consistent with input type=button,  a=diannaS DONTBUILD

Original Revision: https://phabricator.services.mozilla.com/D315429

Differential Revision: https://phabricator.services.mozilla.com/D315956
parent f83930c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -256,8 +256,8 @@ void EndSubmitClick(EventChainVisitor& aVisitor) {
}

void HTMLButtonElement::ActivationBehavior(EventChainPostVisitor& aVisitor) {
  auto endSubmit = MakeScopeExit([&] { EndSubmitClick(aVisitor); });
  if (!aVisitor.mPresContext) {
    // Should check whether EndSubmitClick is needed here.
    return;
  }

+4 −0
Original line number Diff line number Diff line
@@ -817,6 +817,10 @@ nsresult HTMLFormElement::SubmitSubmission(
    return NS_OK;
  }

  if (doc->GetSandboxFlags() & SANDBOXED_FORMS) {
    return NS_OK;
  }

  // javascript URIs are not really submissions; they just call a function.
  // Also, they may synchronously call submit(), and we want them to be able to
  // do so while still disallowing other double submissions. (Bug 139798)