floating-vue icon indicating copy to clipboard operation
floating-vue copied to clipboard

Hover Menu: focus and hover triggers are incompatible

Open jlswanson28694 opened this issue 1 year ago • 0 comments

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

jlswanson28694 avatar Aug 29 '24 22:08 jlswanson28694