Bug 1290927 - Remove hash link from technical info on certerror pages. r=Gijs
MozReview-Commit-ID: 8XKbST09Zrc
--- 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