Add delayed scrollTop checks to catch post-load changes

This commit is contained in:
Yuyao Huang 2026-05-09 14:39:00 +08:00
parent df74f1b8a7
commit 0f1fa712a9

View File

@ -74,7 +74,14 @@ async function loadTasks() {
}
initScrollFocus();
console.log("loadTasks end: scrollTop =", document.getElementById("scroll-view").scrollTop);
const scrollView = document.getElementById("scroll-view");
const finalScrollTop = scrollView.scrollTop;
console.log("loadTasks end: scrollTop =", finalScrollTop);
// Delayed checks to catch any post-load scroll changes
setTimeout(() => console.log("100ms after load: scrollTop =", scrollView.scrollTop), 100);
setTimeout(() => console.log("500ms after load: scrollTop =", scrollView.scrollTop), 500);
setTimeout(() => console.log("1000ms after load: scrollTop =", scrollView.scrollTop), 1000);
} catch (error) {
console.error("Failed to load tasks:", error);
} finally {