Skip to content

Commit ee838f7

Browse files
authored
Backport "Fix: Correct the navigation to anchor" to LTS (#18985)
Backports #17910 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents 287a32d + bbf95d9 commit ee838f7

File tree

1 file changed

+1
-1
lines changed
  • scaladoc/resources/dotty_res/scripts

1 file changed

+1
-1
lines changed

scaladoc/resources/dotty_res/scripts/ux.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ document
285285
getTocListElement(id).parentElement.classList.toggle("active");
286286
}
287287
if (lastEntry.isIntersecting) {
288-
window.location.hash = "";
288+
history.replaceState(history.state, "", window.location.pathname + window.location.search);
289289
removeAllHighlights();
290290
const id = getIdOfElement(lastEntry);
291291

0 commit comments

Comments
 (0)