From 056247a414782beb9b20825f09876e36cb6c6609 Mon Sep 17 00:00:00 2001 From: Vasilii Mikhailovskii Date: Wed, 27 Nov 2024 11:10:42 +0200 Subject: [PATCH] fix scroll --- apps/frontend/src/router/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/router/index.ts b/apps/frontend/src/router/index.ts index 26ae13c..753b8b1 100644 --- a/apps/frontend/src/router/index.ts +++ b/apps/frontend/src/router/index.ts @@ -94,7 +94,7 @@ const router = createRouter({ history: createWebHistory(), routes, scrollBehavior(to, from, savedPosition) { - if (savedPosition) { + if (savedPosition && to.name !== ROUTE_NAMES.CREATE) { return savedPosition } else { return { top: 0, behavior: 'smooth' }