Skip to content

Hide tooltips on mouseleave when @useFocus is true - #36

Merged
amk221 merged 1 commit into
mainfrom
use-focus-hide-tooltip-on-mouse-leave
Jan 5, 2026
Merged

amk221 merged 1 commit into
mainfrom
use-focus-hide-tooltip-on-mouse-leave

Conversation

@Pjaerr

@Pjaerr Pjaerr commented Dec 31, 2025

Copy link
Copy Markdown
Member

If a user clicks a tooltipper, which means it gains focus, the tooltip would not have been hidden when they move their mouse away if @useFocus is true as the tooltipper would still have focus from the click. If using a mouse you don't really care about whether an element is focused or not.

Added a test for this behaviour, and a test to make sure that the tooltips aren't hidden on mouseleave when you're focused on their interactive children.

If a user clicks a tooltipper, which means it gains focus, the tooltip would not have been hidden when they move their mouse away if `@useFocus` is true as the tooltipper would still have focus from the click.
@Pjaerr Pjaerr self-assigned this Dec 31, 2025
@amk221
amk221 self-requested a review January 5, 2026 10:36

@amk221 amk221 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@amk221
amk221 merged commit 85c50d5 into main Jan 5, 2026
1 of 3 checks passed
@Pjaerr
Pjaerr deleted the use-focus-hide-tooltip-on-mouse-leave branch January 7, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants