Docs fixes (#2446)

This commit is contained in:
Joe Rickerby
2025-06-04 18:20:54 -04:00
committed by GitHub
parent 4e8d0757df
commit b5c33b7a09
3 changed files with 18 additions and 2 deletions
+15
View File
@@ -126,6 +126,21 @@ function ThemeNav () {
});
link.prepend(expand);
});
// EDIT by joerick
//
// workaround a bug with the site in safari. safari navigates to the
// anchor before the above code has run, specifically wrap with
// .wy-table-responsive activates css rules that change the size of
// tables, making anchor points move around.
console.log('Document ready, checking for anchor in URL');
const anchorEl = document.querySelector(window.location.hash);
anchorEl.getBoundingClientRect(); // Force layout to ensure scrollIntoView works correctly
if (anchorEl) {
console.log('Anchor element:', anchorEl);
anchorEl.scrollIntoView({ behavior: 'instant', block: 'start' });
}
// end edit by joerick
};
nav.reset = function () {