From 81e0a34a5b96221c41ac9ccd189bc1abefa60e50 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 147db1811b7..3a991ae4184 100644 --- a/src/components/Link/LinkBubbleView.vue +++ b/src/components/Link/LinkBubbleView.vue @@ -229,6 +229,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 dec19f47f6a..c7545189ea8 100644 --- a/src/plugins/links.js +++ b/src/plugins/links.js @@ -78,7 +78,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 }