From 78382d8834aaf7170d70579eb204e6a602bbeb65 Mon Sep 17 00:00:00 2001 From: Tamaarine Date: Sat, 22 Oct 2022 12:02:46 -0400 Subject: [PATCH] Added a temp fix about going back to previous scroll position --- frontend/src/router/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index c2a8b957..2916a48e 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -35,6 +35,17 @@ const titles = { const router = new Router({ base: baseURL, mode: "history", + scrollBehavior (to, from, saved) { + if (saved) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve({saved}) + }, 50) + }) + } + // Scroll to top if no saved + return false + }, routes: [ { path: "/login",