-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect event.target.matches(':hover')
in useFocus onBlur
handler
#2791
Comments
Are there cases where you wouldn't want this? Would be better to simply not have an option at all if possible. |
No, you're right, but I don't know if that would break anything. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I am using
Listbox
component ofheadlessui
, in simple words, when I click onListbox.Button
which is used to openListbox.Options
, the focus will be moved toListbox.Options
programmatically, but At this time, the mouse is still onListbox.Button
, which will trigger theonBlur
event defined byuseFocus
, causing the ToolTip to disappear. As the mouse continues to move onListbox.Button
, the ToolTip will reappear until the mouse leaves the ToolTip.This is weird, I hope to be able to add logic similar to the following to
useFocus
:A new option for useFocus can be introduced to solve this issue. If you are willing to provide information on how to name and default value for this option, I would be happy to open a PR for this.
To Reproduce
Screenshots
reprod.mp4
Expected behavior
Screenshots
hope.mp4
Context:
The text was updated successfully, but these errors were encountered: