From 0729779e0427c68bdbc5b6b711a5683f66ba9bbc Mon Sep 17 00:00:00 2001 From: "longhe.li" Date: Wed, 4 Mar 2026 22:13:58 +0800 Subject: [PATCH] fix: toggle focus mode do not reset editor height (#5504) Signed-off-by: longhe.li Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- web/src/components/MemoEditor/Editor/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/components/MemoEditor/Editor/index.tsx b/web/src/components/MemoEditor/Editor/index.tsx index d801d222c..6cce83cc9 100644 --- a/web/src/components/MemoEditor/Editor/index.tsx +++ b/web/src/components/MemoEditor/Editor/index.tsx @@ -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 (