Skip to content
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

Hover Menu: focus and hover triggers are incompatible #1049

Open
jlswanson28694 opened this issue Aug 29, 2024 · 0 comments
Open

Hover Menu: focus and hover triggers are incompatible #1049

jlswanson28694 opened this issue Aug 29, 2024 · 0 comments

Comments

@jlswanson28694
Copy link

I'd like to use the Hover Menu component on my site's navbar, but I'm running into an issue. I'd like the dropdown to open on hover for mouse users, and I'd also like to let keyboard users open the dropdown by focusing the button. However, when both of these triggers are active, the focus trigger doesn't work.

The hover functionality hides the dropdown when the mouse is detected as outside of the dropdown area, which is great for mouse users, but not for keyboard users. When the mouse is outside the dropdown area, focusing the dropdown button will activate the dropdown for a brief moment before closing again. Is there a way to tell the component to keep the dropdown open if the mouse isn't moving?

You can reproduce this issue in the documentation: https://floating-vue.starpad.dev/guide/component#hover-menu

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

No branches or pull requests

1 participant