From 3b5cbfac94f7f28a7c59bc80d2811034c2c1e6de Mon Sep 17 00:00:00 2001 From: Samfresh <140739099+Samfresh-ai@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:17:32 +0100 Subject: [PATCH] fix: refresh editor after comments pane resize --- src/cloud/components/Editor/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cloud/components/Editor/index.tsx b/src/cloud/components/Editor/index.tsx index 639530cb0..b0c6a2b0c 100644 --- a/src/cloud/components/Editor/index.tsx +++ b/src/cloud/components/Editor/index.tsx @@ -811,6 +811,16 @@ const Editor = ({ } }, [editorLayout]) + useEffect(() => { + if (editorRef.current == null) { + return + } + + window.requestAnimationFrame(() => { + editorRef.current?.refresh() + }) + }, [preferences.docContextMode]) + useEffect(() => { focusEditorEventEmitter.listen(focusEditor) return () => {