Skip to content

Commit

Permalink
fix(Preview): hide link bubble when preview menu opens
Browse files Browse the repository at this point in the history
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Mar 12, 2024
1 parent 1db021e commit 17a1673
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/extensions/LinkBubblePluginView.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ class LinkBubblePluginView {

const hasBubbleFocus = this.#component.element.contains(document.activeElement)
const hasEditorFocus = view.hasFocus() || hasBubbleFocus

const shouldShow = !!linkNode && hasEditorFocus
// Preview menu might be open when selection is before the link.
const insideLink = resolved.textOffset !== 0
const shouldShow = !!linkNode
&& hasEditorFocus
&& insideLink

this.updateTooltip(view, shouldShow, linkNode, nodeStart)
}, 250)
Expand Down

0 comments on commit 17a1673

Please sign in to comment.