From 4a848d1951224a45709751bcce90bb0573001bee Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 22 Nov 2023 01:04:58 +0800 Subject: [PATCH] fix: page jumping issue when switching page --- src/contentScripts/views/App.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index f43a0dcb..4d83655f 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -77,10 +77,8 @@ const isTopbarFixed = computed(() => { watch( () => activatedPage.value, () => { - setTimeout(() => { - const osInstance = scrollbarRef.value.osInstance() - osInstance.elements().viewport.scrollTop = 0 - }, 500) + const osInstance = scrollbarRef.value.osInstance() + osInstance.elements().viewport.scrollTop = 0 }, )