diff --git a/support/web/js/equations.ts b/support/web/js/equations.ts index ba139694c..420b2a95a 100644 --- a/support/web/js/equations.ts +++ b/support/web/js/equations.ts @@ -67,13 +67,13 @@ function scrollToHash() { const id = window.location.hash.slice(1); // #id doesn't work with numerical IDs const elem = document.querySelector(`[id="${id}"]`); - if (!(elem instanceof HTMLInputElement)) return; + if (!(elem instanceof HTMLElement)) return; // If the element is in a commented-out block or a
tag, unhide it // and scroll to it. - const commentedOut = elem.closest('.commented-out') as HTMLInputElement | null; + const commentedOut = elem.closest('.commented-out') as HTMLElement | null; if (commentedOut) commentedOut.style.display = 'revert'; - const details = elem.closest('details') as HTMLInputElement | null; + const details = elem.closest('details') as HTMLElement | null; if (details) details.setAttribute("open", ""); if (commentedOut || details)