Skip to content

Commit

Permalink
webapp: always scroll up when navigating to another view
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen authored and tbnobody committed Nov 1, 2024
1 parent 3fa864c commit 661ea6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webapp/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ import { createRouter, createWebHistory } from 'vue-router';
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
linkActiveClass: 'active',
scrollBehavior() {
return new Promise((resolve) => {
setTimeout(() => {
resolve({ top: 0 });
}, 100);
});
},
routes: [
{
path: '/',
Expand Down

0 comments on commit 661ea6c

Please sign in to comment.