Skip to content

Commit

Permalink
fix(LinkBubble): Fix race condition between hide and update
Browse files Browse the repository at this point in the history
Hide was called with a timeout of 100ms, while update was not. This
could lead to a race condition and flaky link bubble behaviour.

The timeout is not needed anymore anyway, as we don't hide the link
bubble anymore on editor blur.

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Jun 25, 2024
1 parent 603a632 commit 01d8a12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugins/LinkBubblePluginView.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ class LinkBubblePluginView {
if (active?.mark) {
this.updateTooltip(view, active)
} else {
setTimeout(() => {
this.tippy?.hide()
}, 100)
this.removeEventListeners()
this.tippy?.hide()
}
}

Expand Down

0 comments on commit 01d8a12

Please sign in to comment.