From 7e1ca4c8bdfa338cf4ec7e9c27057bd6a8c1407f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20K=C3=BChn?= Date: Thu, 18 Nov 2021 12:38:02 +0100 Subject: [PATCH] refactoring --- packages/core/src/NodeView.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/src/NodeView.ts b/packages/core/src/NodeView.ts index 54b662ec..35c35ccc 100644 --- a/packages/core/src/NodeView.ts +++ b/packages/core/src/NodeView.ts @@ -202,7 +202,12 @@ export class NodeView< // this is because ProseMirror can’t preventDispatch on enter // this will lead to a re-render of the node view on enter // see: https://github.com/ueberdosis/tiptap/issues/1214 - if (this.dom.contains(mutation.target) && mutation.type === 'childList' && isiOS() && this.editor.isFocused) { + if ( + this.dom.contains(mutation.target) + && mutation.type === 'childList' + && isiOS() + && this.editor.isFocused + ) { const changedNodes = [ ...Array.from(mutation.addedNodes), ...Array.from(mutation.removedNodes),