[Menus] - Continue with default action if user does not actually open submenu after `isPointerMovingToSubmenu`
Bug report
Current Behavior
Right now, there is some logic in regards to menus/submenus where, if a user is moving their mouse towards a submenu, any relevant event (item leave, enter, trigger leave, etc) will be prevented. This is fine, but it can lead to some confusing UX moments.
https://github.com/radix-ui/primitives/assets/7005873/2d5d7fe6-4aa5-4887-991e-7677d6f8c032
Like in this example, we end up in a spot where a user leaves a sub menu trigger, but the menu stays open. This has led to situations where, if we have two sub menu triggers adjacent to one another, the first menu wont close, and the next one wont open, which isn't ideal.
Expected behavior
I would expect that, after a certain grace period/delay, the component would be able to determine that, despite the intent, the user has not actually entered the submenu, and as such, the original event should be fired after said grace period/delay.
Reproducible example
Suggested solution
Additional context
Your environment
| Software | Name(s) | Version |
|---|---|---|
| Radix Package(s) | @radix-ui/react-dropdown-menu / @radix-ui/react-context-menu | 2.06 / 2.1.5 |
| React | n/a | 18.2.0 |
| Browser | ||
| Assistive tech | ||
| Node | n/a | |
| npm/yarn | ||
| Operating System |