mirror of https://github.com/usememos/memos.git
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:
parent
2c3f9e3bfb
commit
0729779e04
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue