Skip to content

[HoverCard] continues to show after mousing on then off of trigger #1248

Open
@ghost

Description

Bug report

Thanks for all your work on the library!

Current Behavior

Mousing over, through, and fully past a list of HoverCard triggers causes the first one moused over(top or bottom) to show its card which then remains visible instead of going away.

Demo screen recording:

Screen.Recording.2022-03-15.at.3.31.28.PM.mov

Expected behavior

I'd expect mousing out of any trigger before an openDelay has finished, would cancel that timing/delay so there are no lingering cards appearing when not desired or expected.

Reproducible example

CodeSandbox example from default example

Suggested solution

I'd imagine a solution that cancels any openDelay on mouseOut of the trigger—only before openDelay ends(so you can still mouse over the card itself)—could work.

I wasn't able to find, in any of the docs, discord, or source, a way to access the delay timeout to try to do this myself.

So, either access to the delay timeouts, or a full-fledged solution would be great.

Additional context

The example above uses the default example from the docs, applied instead to a list of triggers.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-hover-card 0.1.5
React n/a 17.0.2
Browser Chrome 99.0.4844.51
Assistive tech n/a n/a
Node n/a 4.2.3
npm/yarn npm 2.14.7
Operating System macOS Monterey 12.3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions