fix: toggle focus mode do not reset editor height (#5504)

Signed-off-by: longhe.li <lilonghe@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
longhe.li 2026-03-04 22:13:58 +08:00 committed by GitHub
parent 2c3f9e3bfb
commit 0729779e04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -181,6 +181,11 @@ const Editor = forwardRef(function Editor(props: EditorProps, ref: React.Forward
isInIME,
});
// Recalculate editor height when focus mode changes
useEffect(() => {
updateEditorHeight();
}, [isFocusMode, updateEditorHeight]);
return (
<div
className={cn(