Bug 1526248: Hide the sync sign-in form after submission. r=Gijs
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 28 Feb 2019 18:09:50 +0000
changeset 519668 a155eb7dcdac88ccb4f656df98b98014f4cc0c5c
parent 519667 5dc14c7be6268b387ca085cdc996ef715f4a47b9
child 519669 a27b5825884bd750be974a963caa7ccb74d781e4
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1526248
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1526248: Hide the sync sign-in form after submission. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D21562
browser/base/content/newInstallPage.js
--- a/browser/base/content/newInstallPage.js
+++ b/browser/base/content/newInstallPage.js
@@ -39,31 +39,30 @@ async function requestFlowMetrics() {
   throw new Error(`Failed to retrieve metrics: ${response.status}`);
 }
 
 async function submitForm(event) {
   // We never want to submit the form.
   event.preventDefault();
 
   let input = document.getElementById("sync-input");
-  input.disabled = true;
-  document.getElementById("sync-button").disabled = true;
 
   let { flowId, flowBeginTime } = await metrics;
 
   let requestURL = new URL(await endpoint);
   appendParams(requestURL, {
     "action": "email",
     "utm_campaign": CAMPAIGN,
     "email": input.value,
     "flow_id": flowId,
     "flow_begin_time": flowBeginTime,
   });
 
   window.open(requestURL, "_blank", "noopener");
+  document.getElementById("sync").hidden = true;
 }
 
 const endpoint = RPMGetFxAccountsEndpoint(ENTRYPOINT);
 
 // This must come before the CSP is set or it will be blocked.
 const metrics = requestFlowMetrics();
 
 document.addEventListener("DOMContentLoaded", () => {