diff --git a/web/components/CoWriterEditor.tsx b/web/components/CoWriterEditor.tsx index a563197f9..287c831ed 100644 --- a/web/components/CoWriterEditor.tsx +++ b/web/components/CoWriterEditor.tsx @@ -341,7 +341,7 @@ export default function CoWriterEditor({ // Synchronized scroll functionality const handleEditorScroll = useCallback(() => { if (isSyncingScroll.current) return; - const editor = editorContainerRef.current; + const editor = textareaRef.current; const preview = previewRef.current; if (!editor || !preview) return; @@ -358,7 +358,7 @@ export default function CoWriterEditor({ const handlePreviewScroll = useCallback(() => { if (isSyncingScroll.current) return; - const editor = editorContainerRef.current; + const editor = textareaRef.current; const preview = previewRef.current; if (!editor || !preview) return; @@ -1477,19 +1477,16 @@ export default function CoWriterEditor({ {content.length} chars ยท {content.split("\n").length} lines -