fix: revert async focus, fix #1658

This commit is contained in:
Philipp Kühn 2021-07-30 09:33:55 +02:00
parent 040a539f0f
commit c9869c8d30

View File

@ -73,13 +73,7 @@ export const focus: RawCommands['focus'] = (position = null) => ({
tr.setStoredMarks(storedMarks) tr.setStoredMarks(storedMarks)
} }
// focus async because in some situations weird things happen view.focus()
// see: https://github.com/ueberdosis/tiptap/issues/1520
setTimeout(() => {
if (!editor.isDestroyed) {
view.focus()
}
}, 0)
} }
return true return true