From 10fea3b44ef7bdc62d9392f8b04409cada233292 Mon Sep 17 00:00:00 2001 From: Jon Noronha Date: Thu, 18 Nov 2021 03:37:21 -0800 Subject: [PATCH] fix: Ignore iOS mutations when unfocused (#2170) --- packages/core/src/NodeView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/NodeView.ts b/packages/core/src/NodeView.ts index 16f9afc8..54b662ec 100644 --- a/packages/core/src/NodeView.ts +++ b/packages/core/src/NodeView.ts @@ -202,7 +202,7 @@ 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()) { + if (this.dom.contains(mutation.target) && mutation.type === 'childList' && isiOS() && this.editor.isFocused) { const changedNodes = [ ...Array.from(mutation.addedNodes), ...Array.from(mutation.removedNodes),