From d84059ede45b6a4898e52b14bba2432b4b2471cb Mon Sep 17 00:00:00 2001 From: Billy Lam Date: Tue, 1 Oct 2019 10:58:54 +1300 Subject: [PATCH 1/3] Allow selection mutation events for leaf node views --- packages/tiptap/src/Utils/ComponentView.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/tiptap/src/Utils/ComponentView.js b/packages/tiptap/src/Utils/ComponentView.js index 64c620097..675cd4230 100644 --- a/packages/tiptap/src/Utils/ComponentView.js +++ b/packages/tiptap/src/Utils/ComponentView.js @@ -116,6 +116,10 @@ export default class ComponentView { // prevent a full re-render of the vue component on update // we'll handle prop updates in `update()` ignoreMutation(mutation) { + if (mutation.type === "selection") { + return false; + } + if (!this.contentDOM) { return true } From dd7eafb99836cda20516c77bf2ef77170b8901de Mon Sep 17 00:00:00 2001 From: Billy Lam Date: Mon, 21 Oct 2019 09:56:24 +1300 Subject: [PATCH 2/3] Allow leaf nodes to be selected --- packages/tiptap/src/Utils/ComponentView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/tiptap/src/Utils/ComponentView.js b/packages/tiptap/src/Utils/ComponentView.js index 675cd4230..4f7a26f89 100644 --- a/packages/tiptap/src/Utils/ComponentView.js +++ b/packages/tiptap/src/Utils/ComponentView.js @@ -116,6 +116,8 @@ export default class ComponentView { // prevent a full re-render of the vue component on update // we'll handle prop updates in `update()` ignoreMutation(mutation) { + + // allow leaf nodes to be selected if (mutation.type === "selection") { return false; } From c515dce9a8bd2ebfd26cf76247765f59f666627e Mon Sep 17 00:00:00 2001 From: Billy Lam Date: Mon, 21 Oct 2019 10:22:16 +1300 Subject: [PATCH 3/3] Fix formatting --- packages/tiptap/src/Utils/ComponentView.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/tiptap/src/Utils/ComponentView.js b/packages/tiptap/src/Utils/ComponentView.js index 4f7a26f89..9f4d50a4a 100644 --- a/packages/tiptap/src/Utils/ComponentView.js +++ b/packages/tiptap/src/Utils/ComponentView.js @@ -116,10 +116,9 @@ export default class ComponentView { // prevent a full re-render of the vue component on update // we'll handle prop updates in `update()` ignoreMutation(mutation) { - // allow leaf nodes to be selected - if (mutation.type === "selection") { - return false; + if (mutation.type === 'selection') { + return false } if (!this.contentDOM) {