fix editor size

#282
This commit is contained in:
pompurin404 2024-10-28 11:04:52 +08:00
parent 9a860cbe94
commit 8abfeb1213
No known key found for this signature in database

View File

@ -105,7 +105,9 @@ export const BaseEditor: React.FC<Props> = (props) => {
useEffect(() => { useEffect(() => {
window.onresize = (): void => { window.onresize = (): void => {
editorRef.current?.layout() setTimeout(() => {
editorRef.current?.layout()
}, 0)
} }
return (): void => { return (): void => {
window.onresize = null window.onresize = null