From c9869c8d3021510366a46e840a66e8c06a6586ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Fri, 30 Jul 2021 09:33:55 +0200 Subject: [PATCH] fix: revert async focus, fix #1658 --- packages/core/src/commands/focus.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/core/src/commands/focus.ts b/packages/core/src/commands/focus.ts index cf374a41d..dd3aee215 100644 --- a/packages/core/src/commands/focus.ts +++ b/packages/core/src/commands/focus.ts @@ -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