From 527a7443f14a532ddefe9d612a7bafc6af7846d4 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Thu, 3 Oct 2019 10:51:08 +0200 Subject: [PATCH 1/2] fix(menu-bubble-hide): only send hide update, target not child of editor --- packages/tiptap/src/Plugins/MenuBubble.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tiptap/src/Plugins/MenuBubble.js b/packages/tiptap/src/Plugins/MenuBubble.js index 1e2f9e707..60245b863 100644 --- a/packages/tiptap/src/Plugins/MenuBubble.js +++ b/packages/tiptap/src/Plugins/MenuBubble.js @@ -143,7 +143,7 @@ class Menu { } hide(event) { - if (event && event.relatedTarget) { + if (event && event.relatedTarget && this.options.element.parentNode.contains(event.relatedTarget)) { return } From cfa506e89effc5c95f2c789687cad0c1a614e9fb Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Thu, 3 Oct 2019 11:01:22 +0200 Subject: [PATCH 2/2] refactor(menu-bubble-hide): break conditional to multiple lines --- packages/tiptap/src/Plugins/MenuBubble.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tiptap/src/Plugins/MenuBubble.js b/packages/tiptap/src/Plugins/MenuBubble.js index 60245b863..e2e1fd438 100644 --- a/packages/tiptap/src/Plugins/MenuBubble.js +++ b/packages/tiptap/src/Plugins/MenuBubble.js @@ -143,7 +143,8 @@ class Menu { } hide(event) { - if (event && event.relatedTarget && this.options.element.parentNode.contains(event.relatedTarget)) { + if (event && event.relatedTarget + && this.options.element.parentNode.contains(event.relatedTarget)) { return }