From 003c439658186166c751f68894b6f8843865cb0b Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 23 Oct 2025 00:05:05 +0200 Subject: [PATCH] feat(reading-position): restore smooth animated scroll Changed scroll behavior from 'auto' to 'smooth' when restoring reading position for better UX. --- src/components/ContentPanel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ContentPanel.tsx b/src/components/ContentPanel.tsx index 8e565dd2..6c1bc6cb 100644 --- a/src/components/ContentPanel.tsx +++ b/src/components/ContentPanel.tsx @@ -353,10 +353,10 @@ const ContentPanel: React.FC = ({ suppressSavesForRef.current(1500) } - // Perform instant restore (avoid smooth animation oscillation) + // Perform smooth animated restore window.scrollTo({ top: targetTop, - behavior: 'auto' + behavior: 'smooth' }) console.log('[reading-position] ✅ Scroll restored to', Math.round(bestPosition.position * 100) + '%') }, 500) // Give content time to render