[Repo Assist] fix: make code tooltip interactive — allow mouse to enter tooltip to select/copy text#1130
Conversation
…t/copy text The mouseout handler on [data-fsdocs-tip] trigger elements was hiding the tooltip whenever the mouse left the trigger, even if it was moving INTO the tooltip popover. This made it impossible to select or copy text from the tooltip. Fixes: 1. Trigger mouseout handler now checks if relatedTarget is inside the tooltip element, and skips hiding in that case. 2. New mouseout handler on .fsdocs-tip[popover] hides the tooltip when the mouse leaves the tooltip itself (unless it returns to the trigger). 3. CSS adds cursor: text and user-select: text to the open tooltip so users have a visual cue that text is selectable. Closes #949 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…01-b44c688d13d9f923
|
✓ Repo Assist completed successfully, see workflow run. |
…tooltip Previously, the 20px offset between cursor and tooltip created a dead zone. When the mouse left the trigger into this gap, the tooltip hid immediately because relatedTarget was not the tooltip element. A short delay gives the mouse time to reach the tooltip before hiding fires. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 Repo Assist here. Thanks for the feedback! The root cause was a dead zone between the cursor and tooltip. The tooltip is positioned 20px below the cursor, so when the mouse moves downward from the trigger into that gap, Fix applied: instead of hiding synchronously on The updated code is now pushed to this PR.
|

🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #949
Root Cause
The
mouseouthandler on[data-fsdocs-tip]trigger elements always hid the tooltip as soon as the mouse left the trigger, including when the mouse moved into the tooltip popover. This made it impossible for users to hover over the tooltip to select or copy the type signature text — a common need when working with complex F# types.Fix
docs/content/fsdocs-tips.js:mouseouthandler, added a check: ifrelatedTargetis inside the tooltip element, skip hiding (the user is entering the tooltip).mouseouthandler on.fsdocs-tip[popover]that hides the tooltip when the mouse leaves the tooltip itself, but not if it returns to the trigger element.docs/content/fsdocs-default.css:3. Added
cursor: textanduser-select: texttodiv.fsdocs-tip:popover-openso users get a visual cue that tooltip text is selectable.Behaviour after fix
Changes
docs/content/fsdocs-tips.js— JS logic for interactive tooltip hoverdocs/content/fsdocs-default.css—cursor: text+user-select: texton open tooltipRELEASE_NOTES.md— changelog entryTest Status
dotnet buildfails with "Creating directory" errors in the CI runner environment — this is a pre-existing sandbox limitation (obj/ directory creation fails), not caused by my changes. The changed files are pure JavaScript and CSS; they contain no compiled .NET code.Previous CI runs on similar JS/CSS-only changes have passed in the actual GitHub Actions environment. The logic has been manually verified by reading the event flow.