webapp: always scroll up when navigating to another view

This commit is contained in:
Bernhard Kirchen 2024-10-28 21:11:07 +01:00 committed by Thomas Basler
parent 3fa864ce52
commit 661ea6c022

View File

@ -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: '/',