Skip to content

v2.0.5 — fix tooltip stuck on highlighted links

Choose a tag to compare

@FallThunder FallThunder released this 22 Feb 00:48
· 23 commits to main since this release

Bug fix

Hovering over a highlight that wraps a link, then middle-clicking or right-clicking to open it in a new tab, left the tooltip permanently visible on the original tab with no way to dismiss it.

Root cause: Middle-click fires auxclick (not click) and right-click fires contextmenu — both bypass the span's click handler, so hideTooltip() was never called.

Fix:

  • auxclick and contextmenu listeners added to each highlight span to hide the tooltip for those interactions
  • visibilitychange listener added at module level to hide the tooltip whenever the tab goes to the background, catching any remaining path (keyboard shortcut, OS-level window switch, etc.)