Skip to content

Commit

Permalink
Scroll to the top of the page whenever route changes (#537)
Browse files Browse the repository at this point in the history
* fix(#533): disable persistent page location on router navigation

---------

Co-authored-by: Matthias Mohr <[email protected]>
  • Loading branch information
JanssenBrm and m-mohr authored Jan 21, 2025
1 parent fb24e04 commit 4cc00ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/StacBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ Vue.use(VueRouter);
const router = new VueRouter({
mode: CONFIG.historyMode,
base: CONFIG.pathPrefix,
routes: getRoutes(CONFIG)
routes: getRoutes(CONFIG),
scrollBehavior: () => ({ x: 0, y: 0 })
});
// Setup store
Expand Down

0 comments on commit 4cc00ca

Please sign in to comment.