diff --git a/src/renderer/components/FilePreview.tsx b/src/renderer/components/FilePreview.tsx index 3efa632d..8c22963d 100644 --- a/src/renderer/components/FilePreview.tsx +++ b/src/renderer/components/FilePreview.tsx @@ -655,7 +655,8 @@ export const FilePreview = forwardRef(funct const scrollMarkdownToBoundary = useCallback( (direction: 'top' | 'bottom') => { - const container = markdownContainerRef.current; + // Use contentRef which is the actual scrollable container + const container = contentRef.current; if (!container) return; const top = direction === 'top' ? 0 : container.scrollHeight; container.scrollTo({ top, behavior: 'smooth' });