diff --git a/scaladoc/resources/dotty_res/scripts/ux.js b/scaladoc/resources/dotty_res/scripts/ux.js index 0ead006af84d..dd6e798f17a5 100644 --- a/scaladoc/resources/dotty_res/scripts/ux.js +++ b/scaladoc/resources/dotty_res/scripts/ux.js @@ -285,7 +285,7 @@ document getTocListElement(id).parentElement.classList.toggle("active"); } if (lastEntry.isIntersecting) { - window.location.hash = ""; + history.replaceState(history.state, "", window.location.pathname + window.location.search); removeAllHighlights(); const id = getIdOfElement(lastEntry);