fix(hover-card): keep open while trigger remains focused - #3227
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 18af8fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 86 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Nice fix, and pretty minimal. The clever bit is it doesn't need a new closing path — clearing I also checked how this holds up for the multi-trigger setup, since the guard reads Changeset and e2e test are both present and read fine. Same CI situation as the last three though — one workflow run, |
|
I added coverage for this in 18af8fb. The new test focuses the second trigger, moves the pointer away, and checks that the card stays open. |
Closes #3224
📝 Description
Keep a hover card open when the pointer leaves a trigger that still has keyboard focus.
⛳️ Current behavior (updates)
Moving the pointer away starts closing the hover card even when its trigger remains focused.
🚀 New behavior
Pointer leave no longer closes the hover card while the trigger is focused. Pointer state is cleared so the card still closes when focus later leaves the trigger, and an end-to-end test covers both parts of the interaction.
💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information
#3209 changes the same pointer-leave transition, so this branch may need a small rebase if that PR lands first.