Bug 1290927 - Remove hash link from technical info on certerror pages. r=Gijs, a=ritu
authorJohann Hofmann <jhofmann@mozilla.com>
Thu, 11 Aug 2016 14:28:13 +0200
changeset 349800 bf25a87f89663b10c12ee01a623da8c3a1a57e63
parent 349799 be48ab980c56273dbcc9ec74bf9570934e0fb920
child 349801 cf696b986483b2b58c760e0063c8260904c7fe8d
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, ritu
bugs1290927
milestone50.0a2
Bug 1290927 - Remove hash link from technical info on certerror pages. r=Gijs, a=ritu MozReview-Commit-ID: 8XKbST09Zrc
browser/base/content/aboutNetError.xhtml
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -414,21 +414,21 @@
           sd.appendChild(document.createTextNode(desc.slice(desc.lastIndexOf("</a>") + "</a>".length)));
         }
 
         if (gIsCertError) {
           // Initialize the error code link embedded in the error message to
           // display debug information about the cert error.
           var errorCode = document.getElementById("errorCode");
           if (errorCode) {
-            errorCode.href = "#technicalInformation";
+            errorCode.href = "javascript:void(0)";
             errorCode.addEventListener("click", () => {
-              var div = document.getElementById("certificateErrorDebugInformation");
-              if (toggleDisplay(div) == "block") {
-                div.scrollIntoView({block: "start", behavior: "smooth"});
+              let debugInfo = document.getElementById("certificateErrorDebugInformation");
+              if (toggleDisplay(debugInfo) == "block") {
+                debugInfo.scrollIntoView({block: "start", behavior: "smooth"});
               }
             }, false);
           }
         }
 
         // Initialize the cert domain link.
         var link = document.getElementById("cert_domain_link");
         if (!link)
@@ -641,17 +641,16 @@
           <p id="badCertTechnicalInfo"/>
           <button id="exceptionDialogButton">&securityOverride.exceptionButtonLabel;</button>
         </div>
       </div>
 
     </div>
 
     <div id="certificateErrorDebugInformation">
-      <a name="technicalInformation"></a>
       <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
       <div id="certificateErrorText"/>
       <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
     </div>
 
     <!--
     - Note: It is important to run the script this way, instead of using
     - an onload handler. This is because error pages are loaded as