From 01ae9c964a6d68bdbc19464f6d26ae7b2e6df0a5 Mon Sep 17 00:00:00 2001 From: Yuyao Huang Date: Sat, 9 May 2026 16:06:06 +0800 Subject: [PATCH] fix: add position: relative to scroll-view for correct offsetTop Without position: relative, .task-item offsetParent is the body element, causing offsetTop to be measured from document root rather than the scroll container. This makes scrollToTask calculate wrong scrollTop. --- static/css/tasks.css | 1 + 1 file changed, 1 insertion(+) diff --git a/static/css/tasks.css b/static/css/tasks.css index 7681b80..41026a2 100644 --- a/static/css/tasks.css +++ b/static/css/tasks.css @@ -44,6 +44,7 @@ flex: 1; height: 600px; overflow-y: auto; + position: relative; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);