mirror of
https://github.com/dergigi/boris.git
synced 2026-02-22 23:44:51 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user