Skip to content

Commit

Permalink
fix: revert async focus, fix #1658
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Jul 30, 2021
1 parent 040a539 commit c9869c8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/core/src/commands/focus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ export const focus: RawCommands['focus'] = (position = null) => ({
tr.setStoredMarks(storedMarks)
}

// focus async because in some situations weird things happen
// see: https://github.com/ueberdosis/tiptap/issues/1520
setTimeout(() => {
if (!editor.isDestroyed) {
view.focus()
}
}, 0)
view.focus()
}

return true
Expand Down

0 comments on commit c9869c8

Please sign in to comment.