fix: skip initial handleScrollFocus call to prevent position override

Remove immediate handleScrollFocus() call in initScrollFocus().
Only actual user scroll events will trigger position saving now.
This commit is contained in:
Yuyao Huang 2026-05-09 14:08:22 +08:00
parent 27f85cd913
commit 643ba56768

View File

@ -159,8 +159,6 @@ function initScrollFocus() {
scrollView.removeEventListener("scroll", handleScrollFocus); scrollView.removeEventListener("scroll", handleScrollFocus);
scrollView.addEventListener("scroll", handleScrollFocus); scrollView.addEventListener("scroll", handleScrollFocus);
handleScrollFocus();
} }
function handleScrollFocus() { function handleScrollFocus() {