From e3272ae7f7925572db7d5b4c3224995be5d34887 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 26 Jun 2024 14:14:44 +0200 Subject: [PATCH] fix(LinkBubble): Fix logic to detect transactions without history Signed-off-by: Jonas --- src/components/Link/LinkBubbleView.vue | 1 + src/plugins/links.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Link/LinkBubbleView.vue b/src/components/Link/LinkBubbleView.vue index 4d65279dd8b..89158031bb8 100644 --- a/src/components/Link/LinkBubbleView.vue +++ b/src/components/Link/LinkBubbleView.vue @@ -224,6 +224,7 @@ export default { removeLink() { this.editor.chain() + // Explicitly hide bubble to prevent flickering before it's removed .hideLinkBubble() .unsetLink() .focus() diff --git a/src/plugins/links.js b/src/plugins/links.js index 82ff913ac1d..f090de3eba9 100644 --- a/src/plugins/links.js +++ b/src/plugins/links.js @@ -95,7 +95,7 @@ export function linkBubble(options) { const sameSelection = oldState?.selection.eq(state.selection) const sameDoc = oldState?.doc.eq(state.doc) // Don't open bubble on changes by other session members - const noHistory = !transactions.some(tr => tr.meta.addToHistory) + const noHistory = transactions.every(tr => tr.meta.addToHistory === false) if (sameSelection && (noHistory || sameDoc)) { return }