diff --git a/app/dist/scripts/app.js b/app/dist/scripts/app.js index 22117c0..6a50fa4 100755 --- a/app/dist/scripts/app.js +++ b/app/dist/scripts/app.js @@ -36,13 +36,8 @@ document.querySelectorAll("a[href^='#']").forEach(anchor => { if (document.getElementById(element)) { elementOffset = document.getElementById(element).offsetTop - 74; window.scroll({ top: elementOffset, behavior: "smooth" }); + history.replaceState({}, "", `#${element}`); // Add hash to URL bar } - - // Add hash to URL bar when sidebar links are clicked - if ( - event.target.parentElement.className === "api__toc__item" || - event.target.parentElement.parentElement.className === "component--glossary-toc" - ) history.replaceState({}, "", `#${element}`); }); });