diff --git a/components/nav/NavSideItem.vue b/components/nav/NavSideItem.vue index 6d323e17..5c0d222f 100644 --- a/components/nav/NavSideItem.vue +++ b/components/nav/NavSideItem.vue @@ -51,7 +51,7 @@ const noUserVisual = computed(() => isHydrated.value && props.userOnly && !curre :active-class="activeClass" group focus:outline-none disabled:pointer-events-none :tabindex="noUserDisable ? -1 : null" - @click="$scrollToTop" + @click="$trackScroll.forceScrollToTop()" >
{ return new Promise((resolve, reject) => { setTimeout(() => { - if (path !== route.fullPath) { + const fullPath = route.fullPath + if (path !== fullPath) { reject(new Error('navigation canceled')) return } - const r = ignoreCustomRoutes ? undefined : customRoutes.has(route.fullPath) + const r = ignoreCustomRoutes ? undefined : customRoutes.has(fullPath) if (r) { reject(new Error('custom routed detected')) return } - const scrollPosition = storage.value[route.fullPath] + const scrollPosition = storage.value[fullPath] if (scrollPosition) window.scrollTo(0, scrollPosition)