Docs: mobile layout fix (#2466)

* Remove console warning

* Fix table overflow issue on mobile
This commit is contained in:
Joe Rickerby
2025-06-11 08:57:43 +01:00
committed by GitHub
parent ff86a64577
commit a73177515a
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -134,11 +134,13 @@ function ThemeNav () {
// .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' });
if (window.location.hash) {
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
};