Unverified Commit 0729779e authored by longhe.li's avatar longhe.li Committed by GitHub

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

Signed-off-by: 's avatarlonghe.li <lilonghe@outlook.com>
Co-authored-by: 's avatarCopilot <175728472+Copilot@users.noreply.github.com>
parent 2c3f9e3b
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment