Bug 1290927 - Remove hash link from technical info on certerror pages. r=Gijs draft
authorJohann Hofmann <jhofmann@mozilla.com>
Thu, 11 Aug 2016 14:28:13 +0200
changeset 401015 fe5366025e46efb2c7e066847821d0985a972d0e
parent 399408 0502bd9e025edde29777ba1de4280f9b52af4663
child 528372 b3ad3a4b9d6a6b753f981e4457d2641773feeb47
push id26335
push usermail@johann-hofmann.com
push dateTue, 16 Aug 2016 05:18:45 +0000
reviewersGijs
bugs1290927
milestone51.0a1
Bug 1290927 - Remove hash link from technical info on certerror pages. r=Gijs 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