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
1 changed files with 5 additions and 0 deletions
|
|
@ -181,6 +181,11 @@ const Editor = forwardRef(function Editor(props: EditorProps, ref: React.Forward
|
||||||
isInIME,
|
isInIME,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Recalculate editor height when focus mode changes
|
||||||
|
useEffect(() => {
|
||||||
|
updateEditorHeight();
|
||||||
|
}, [isFocusMode, updateEditorHeight]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue