Skip to content

Commit

Permalink
fix: Ignore iOS mutations when unfocused (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsjonsense committed Nov 18, 2021
1 parent 6e25e99 commit 10fea3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/NodeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 10fea3b

Please sign in to comment.