Skip to content

Commit

Permalink
fix: fix some react focus issues (ueberdosis#1724), fix ueberdosis#1716
Browse files Browse the repository at this point in the history
…, fix ueberdosis#1608, fix ueberdosis#1520

* remove async createNodeViews

* focus asynchronously to fix weird bugs in react
  • Loading branch information
philippkuehn authored Aug 12, 2021
1 parent c47aea7 commit a2fe315
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/EditorContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit a2fe315

Please sign in to comment.