feat(scroll): use smooth scrollTo instead of direct property assignment
This commit is contained in:
@@ -29,9 +29,9 @@ export const useOverlay = (listen = true) => {
|
||||
if (!mainApp) return
|
||||
|
||||
if (isMobile.value) {
|
||||
mainApp.scrollTop = to
|
||||
mainApp.scrollTo({ top: to, behavior: "smooth" })
|
||||
} else {
|
||||
mainApp.scrollLeft = to
|
||||
mainApp.scrollTo({ left: to, behavior: "smooth" })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user