fix: 💨

This commit is contained in:
codytseng
2025-08-23 23:21:57 +08:00
parent a9caf9d5ad
commit ad3df9b037
4 changed files with 18 additions and 14 deletions

View File

@@ -219,7 +219,7 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
}
setCurrentPrimaryPage(page)
if (needScrollToTop) {
PRIMARY_PAGE_REF_MAP[page].current?.scrollToTop()
PRIMARY_PAGE_REF_MAP[page].current?.scrollToTop('smooth')
}
if (isSmallScreen) {
clearSecondaryPages()
@@ -231,7 +231,7 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
if (isCurrentPage(prevStack, url)) {
const currentItem = prevStack[prevStack.length - 1]
if (currentItem?.ref?.current) {
currentItem.ref.current.scrollToTop()
currentItem.ref.current.scrollToTop('instant')
}
return prevStack
}