Skip to content

Commit 4cc00ca

Browse files
JanssenBrmm-mohr
andauthored
Scroll to the top of the page whenever route changes (#537)
* fix(#533): disable persistent page location on router navigation --------- Co-authored-by: Matthias Mohr <[email protected]>
1 parent fb24e04 commit 4cc00ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/StacBrowser.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Vue.use(VueRouter);
6565
const router = new VueRouter({
6666
mode: CONFIG.historyMode,
6767
base: CONFIG.pathPrefix,
68-
routes: getRoutes(CONFIG)
68+
routes: getRoutes(CONFIG),
69+
scrollBehavior: () => ({ x: 0, y: 0 })
6970
});
7071
7172
// Setup store

0 commit comments

Comments
 (0)