Bug 1406787 - Click on currently active ping in start section should open ping picker. r=Dexter
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 08 Oct 2017 21:41:00 +0200
changeset 679087 63f80aa6ee1bc32c0359d4c7519c2cf636d635a9
parent 679086 415f6ec167208fb652e14621f506065bc1ed3fd2
child 679088 fc96bf1b72ce632c2a010882393cc64b39253bd9
push id84141
push userbmo:schien@mozilla.com
push dateThu, 12 Oct 2017 11:13:04 +0000
reviewersDexter
bugs1406787
milestone58.0a1
Bug 1406787 - Click on currently active ping in start section should open ping picker. r=Dexter MozReview-Commit-ID: 1riOrN2Oj1P
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -337,19 +337,20 @@ var PingPicker = {
       let pingNameHtml = "<span class=\"change-ping\">" + pingName + "</span>";
       explanation = bundle.formatStringFromName("pingDetailsCurrent", [pingLink, pingNameHtml], 2);
     }
 
     let pingExplanation = document.getElementById("ping-explanation");
 
     // eslint-disable-next-line no-unsanitized/property
     pingExplanation.innerHTML = explanation;
-    pingExplanation.querySelector(".change-ping").addEventListener("click", () =>
-      document.getElementById("ping-picker").classList.remove("hidden")
-    );
+    pingExplanation.querySelector(".change-ping").addEventListener("click", (ev) => {
+      document.getElementById("ping-picker").classList.remove("hidden");
+      ev.stopPropagation();
+    });
 
     GenericSubsection.deleteAllSubSections();
   },
 
   async update() {
     let viewCurrent = document.getElementById("ping-source-current").checked;
     let currentChanged = viewCurrent !== this.viewCurrentPingData;
     this.viewCurrentPingData = viewCurrent;