fix: fix some react focus issues (#1724), fix #1716, fix #1608, fix #1520

* remove async createNodeViews

* focus asynchronously to fix weird bugs in react
This commit is contained in:
Philipp Kühn
2021-08-12 18:03:45 +02:00
committed by GitHub
parent 812c49bcb1
commit 956566eaad
5 changed files with 46 additions and 27 deletions

View File

@@ -63,12 +63,7 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
editor.contentComponent = this
// TODO: alternative to setTimeout?
setTimeout(() => {
if (!editor.isDestroyed) {
editor.createNodeViews()
}
}, 0)
editor.createNodeViews()
}
}