Skip to content

Conversation

@tf
Copy link
Member

@tf tf commented Dec 9, 2025

  • Close tooltips after clicking the link button
  • Work around floating-ui issue that causes tooltips to close prematurely when trying to click a link preview tooltip of a tooltip link button

tf added 3 commits December 9, 2025 17:45
When clicking the link button in a hotspot tooltip, the tooltip now
closes. This applies both to tooltips opened via hover and via click.
Clicking elsewhere in the tooltip (e.g., selecting text) still keeps
the tooltip open.

In the editor, clicking the link preview tooltip (that shows the URL
on hover) triggers the onClick callback, since clicking the link text
itself is used for editing.
Prevent the tooltip from being activated again.
floating-ui appears to use native event handlers for detecting
mousedown on the document, but React event callbacks for intercepting
mousedown inside the floating element in the capture phase. Looks like
capture phase for React events happens after native events in React
16. React 17 changes the event system here.

This causes the first click on a link tooltip of the hotspot tooltip
link button to close the tooltip before the link can be clicked in the
editor. In the published editor it disables outside press dismissal
once after a click inside the floating element.

Disable capture for outside press to work around these issue.
@tf tf added this to the v17.2 milestone Dec 9, 2025
@tf tf merged commit 001d51d into codevise:master Dec 10, 2025
18 checks passed
@tf tf deleted the hotspot-tooltip-closing branch December 10, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant