Bug 1443632 - Change screenshots tour action button back to an <a>. r=kitcambridge
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Fri, 09 Mar 2018 17:58:18 -0800
changeset 462524 a28f113ffa3fe9d5253d388c272abdb76e007ebf
parent 462523 d9c906ec2b7de5f540521985f002b3633e153ba6
child 462525 a29e9196602f897fcb88e8b78e96b8b939b732a8
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskitcambridge
bugs1443632
milestone60.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 1443632 - Change screenshots tour action button back to an <a>. r=kitcambridge MozReview-Commit-ID: DeEWxnurLty
browser/extensions/onboarding/content/onboarding.js
--- a/browser/extensions/onboarding/content/onboarding.js
+++ b/browser/extensions/onboarding/content/onboarding.js
@@ -62,22 +62,22 @@ function createOnboardingTourContent(div
 
   div.appendChild(section);
   return section;
 }
 
 /**
  * Helper function to create the tour button UI element.
  */
-function createOnboardingTourButton(div, buttonId, l10nId) {
+function createOnboardingTourButton(div, buttonId, l10nId, buttonElementTagName = "button") {
   let doc = div.ownerDocument;
   let aside = doc.createElement("aside");
   aside.className = "onboarding-tour-button-container";
 
-  let button = doc.createElement("button");
+  let button = doc.createElement(buttonElementTagName);
   button.id = buttonId;
   button.className = "onboarding-tour-action-button";
   button.setAttribute("data-l10n-id", l10nId);
   aside.appendChild(button);
 
   div.appendChild(aside);
   return aside;
 }
@@ -398,19 +398,21 @@ var onboardingTourset = {
       // Screenshot tour opens the screenshot page directly, see below a#onboarding-tour-screenshots-button.
       // The screenshots page should be responsible for highlighting the Screenshots button
 
       createOnboardingTourDescription(div,
         "onboarding.tour-screenshots.title", "onboarding.tour-screenshots.description");
       createOnboardingTourContent(div, "resource://onboarding/img/figure_screenshots.svg");
 
       let aside = createOnboardingTourButton(div,
-        "onboarding-tour-screenshots-button", "onboarding.tour-screenshots.button");
+                                             "onboarding-tour-screenshots-button",
+                                             "onboarding.tour-screenshots.button",
+                                             "a");
 
-      let button = aside.querySelector("button");
+      let button = aside.querySelector("a");
       button.setAttribute("href", "https://screenshots.firefox.com/#tour");
       button.setAttribute("target", "_blank");
 
       return div;
     },
   },
 };