Bug 1467232 - Clear the explanation text first, before adding any changed text. r=Dexter
authorJan-Erik Rediger <jrediger@mozilla.com>
Thu, 07 Jun 2018 13:01:09 +0200
changeset 421798 659052b94cabc97682695960c0c13755e7590613
parent 421797 4fdaaf004dc572b16ebbeac175a3a9c8977612dd
child 421799 0943910146c42402a548e721fcf86bd4940d4f1f
push id104125
push useraciure@mozilla.com
push dateThu, 07 Jun 2018 21:57:03 +0000
treeherdermozilla-inbound@38c222c1bf73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter
bugs1467232
milestone62.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 1467232 - Clear the explanation text first, before adding any changed text. r=Dexter MozReview-Commit-ID: Po12SIQdZm
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -335,16 +335,17 @@ var PingPicker = {
 
       // Change home page text.
       pingNameSpan.textContent = pingName;
       let explanation = bundle.GetStringFromName("pingDetailsCurrent");
       fragment = BrowserUtils.getLocalizedFragment(document, explanation, pingLink, pingNameSpan);
     }
 
     let pingExplanation = document.getElementById("ping-explanation");
+    removeAllChildNodes(pingExplanation);
     pingExplanation.appendChild(fragment);
     pingExplanation.querySelector(".change-ping").addEventListener("click", (ev) => {
       document.getElementById("ping-picker").classList.remove("hidden");
       ev.stopPropagation();
     });
 
     GenericSubsection.deleteAllSubSections();
   },