diff --git a/src/components/ContentPanel.tsx b/src/components/ContentPanel.tsx index ea353a62..dd42cdac 100644 --- a/src/components/ContentPanel.tsx +++ b/src/components/ContentPanel.tsx @@ -263,6 +263,15 @@ const ContentPanel: React.FC = ({ const restoreKey = `${articleIdentifier}-${isTrackingEnabled}` const hasAttemptedRestoreRef = useRef(null) + // Reset scroll position and restore ref when article changes + useEffect(() => { + // Reset scroll to top when article identifier changes + // This prevents showing wrong scroll position from previous article + window.scrollTo({ top: 0, behavior: 'instant' }) + // Reset restore attempt tracking for new article + hasAttemptedRestoreRef.current = null + }, [articleIdentifier]) + useEffect(() => { if (!isTextContent || !activeAccount || !articleIdentifier) { return