cc288ac4e30c8c67b1858013f2347f4a90edfe70
jnavarr5
  Wed Jul 22 15:53:34 2026 -0700
Adding a special case so the final section 'on this page' is highlighted when you reach the bottom of the docs page, no Redmine.

diff --git docs/staticPage.html docs/staticPage.html
index 59eab36c8e0..fb00a516517 100755
--- docs/staticPage.html
+++ docs/staticPage.html
@@ -24,32 +24,38 @@
     var toc = document.getElementById('docs-toc');
     if (!toc) return;
     var links = toc.querySelectorAll('a[href^="#"]');
     if (!links.length) return;
     var sections = [];
     for (var i = 0; i < links.length; i++) {
         var id = links[i].getAttribute('href').slice(1);
         var el = document.getElementById(id);
         if (el) sections.push({link: links[i], target: el});
     }
     if (!sections.length) return;
 
     function onScroll() {
         var scrollY = window.scrollY || window.pageYOffset;
         var current = sections[0];
+        // At the bottom of the page the last section is often too short to
+        // scroll within the 80px threshold, so highlight it explicitly.
+        if (window.innerHeight + scrollY >= document.documentElement.scrollHeight - 2) {
+            current = sections[sections.length - 1];
+        } else {
             for (var i = 0; i < sections.length; i++) {
                 if (sections[i].target.offsetTop <= scrollY + 80) {
                     current = sections[i];
                 }
             }
+        }
         for (var i = 0; i < sections.length; i++) {
             sections[i].link.parentNode.classList.remove('active');
         }
         current.link.parentNode.classList.add('active');
     }
 
     window.addEventListener('scroll', onScroll);
     onScroll();
 })();
 </script>
 
 <!--#include virtual="$$ROOT/inc/gbPageEnd.html" -->