set browser scroll position on navigation in Static Rendering

This commit is contained in:
sbwalker
2024-05-17 13:01:03 -04:00
parent 81adb80b7e
commit 0ba94f3bc9
2 changed files with 26 additions and 13 deletions

View File

@ -0,0 +1,12 @@
function setScrollPosition() {
window.scrollTo({
top: 0,
left: 0,
behavior: 'instant'
});
}
export function onUpdate() {
setScrollPosition();
}