Bug 1269938 - Position cert error debug information using the body's scrollHeight. r=Gijs draft
authorNihanth Subramanya <nhnt11@gmail.com>
Tue, 03 May 2016 17:57:45 -0700
changeset 363143 f68bf8a8cfce2c6bcf79f5d8f7a488ff86e1e81b
parent 362998 89e43e5ca199c1f9caf2c079a118b2388aeb10b2
child 519949 2641c2a404aacf86598b44f4954f451874952cda
push id17110
push usernhnt11@gmail.com
push dateWed, 04 May 2016 00:57:57 +0000
reviewersGijs
bugs1269938
milestone49.0a1
Bug 1269938 - Position cert error debug information using the body's scrollHeight. r=Gijs MozReview-Commit-ID: FBV2z1WlxjK
browser/base/content/aboutNetError.xhtml
browser/themes/shared/aboutNetError.css
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -397,16 +397,17 @@
           // 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.addEventListener("click", () => {
               var div = document.getElementById("certificateErrorDebugInformation");
               if (toggleDisplay(div) == "block") {
+                div.style.top = document.body.scrollHeight + "px";
                 div.scrollIntoView({block: "start", behavior: "smooth"});
               }
             }, false);
           }
         }
 
         // Initialize the cert domain link.
         var link = document.getElementById('cert_domain_link');
--- a/browser/themes/shared/aboutNetError.css
+++ b/browser/themes/shared/aboutNetError.css
@@ -119,17 +119,16 @@ span#hostname {
 }
 
 #certificateErrorDebugInformation {
   display: none;
   background-color: var(--in-content-box-background-hover) !important;
   border-top: 1px solid var(--in-content-border-color);
   position: absolute;
   left: 0%;
-  top: 100%;
   width: 65%;
   padding: 1em 17.5%;
 }
 
 #certificateErrorText {
   font-family: monospace;
   white-space: pre-wrap;
   padding: 1em 0;