mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-13 21:13:40 +02:00
feat: scroll page to top on Vegvisir navigations (#21)
Simple but effective Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/21
This commit is contained in:
parent
359342c7f7
commit
2fa62991f9
1 changed files with 5 additions and 0 deletions
|
@ -48,3 +48,8 @@ const CLASSNAME_SEARCHBOX_ACTIVE = "searchboxActive";
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scroll page to top on navigation
|
||||||
|
{
|
||||||
|
document.addEventListener(vegvisir.Navigation.EVENTS.FINISHED, () => window.scrollTo({top: 0}));
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue