feat(reading-position): restore smooth animated scroll

Changed scroll behavior from 'auto' to 'smooth' when restoring reading position for better UX.
This commit is contained in:
Gigi
2025-10-23 00:05:05 +02:00
parent 019958073c
commit 003c439658

View File

@@ -353,10 +353,10 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
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