fix: skip save during initial handleScrollFocus call
Wrap the initial handleScrollFocus call with isInitializing flag to prevent handleScrollSave from incorrectly updating selected_task_id
This commit is contained in:
+3
-1
@@ -162,8 +162,10 @@ function initScrollFocus() {
|
||||
scrollView.addEventListener("scroll", handleScrollFocus);
|
||||
scrollView.addEventListener("scroll", handleScrollSave);
|
||||
|
||||
// Initial call to set in-focus class
|
||||
// Initial call to set in-focus class (skip saving during init)
|
||||
isInitializing = true;
|
||||
handleScrollFocus();
|
||||
isInitializing = false;
|
||||
}
|
||||
|
||||
function handleScrollFocus() {
|
||||
|
||||
Reference in New Issue
Block a user