diff --git a/src/pages/Editor.tsx b/src/pages/Editor.tsx index e5698d2c2..b8301bfe9 100644 --- a/src/pages/Editor.tsx +++ b/src/pages/Editor.tsx @@ -3210,6 +3210,7 @@ export const Editor = ({ commandScopeId }: EditorProps) => { const startResize = () => { isDragging.current = true; document.body.style.cursor = "row-resize"; + const activeEditor = activeTab ? editorsRef.current[activeTab.id] : undefined; // Overlay prevents CodeMirror from capturing mouse events during drag const overlay = document.createElement("div"); @@ -3239,6 +3240,7 @@ export const Editor = ({ commandScopeId }: EditorProps) => { panels.forEach((el) => { el.style.height = `${newHeight}px`; }); + activeEditor?.layout(); }); } }; @@ -3248,6 +3250,7 @@ export const Editor = ({ commandScopeId }: EditorProps) => { overlay.remove(); if (rafRef.current) cancelAnimationFrame(rafRef.current); setEditorHeight(editorHeightRef.current); + requestAnimationFrame(() => activeEditor?.layout()); document.removeEventListener("mousemove", handleResize); document.removeEventListener("mouseup", stopResize); };