fluentui
fluentui copied to clipboard
[Bug]: react-menu no longer opens on hover with openOnHover prop
Library
React Components / v9 (@fluentui/react-components)
System Info
CPU: (20) x64 Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
Memory: 81.95 GB / 127.71 GB
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (105.0.1343.33)
Internet Explorer: 11.0.22000.120
Are you reporting Accessibility issue?
no
Reproduction
https://codesandbox.io/s/wonderful-goodall-87qser?file=/example.tsx
Bug Description
Actual Behavior
When hovering over a menu trigger with openOnHover
set to true, the menu will open.
Expected Behavior
When hovering over the menu trigger, nothing happens. onOpenChange
is also not called.
This worked in Fluent UI 9.2.0 but is broken in 9.3.0. It prevents us from updating the library.
Logs
No response
Requested priority
Normal
Products/sites affected
Microsoft Loop
Are you willing to submit a PR to fix?
no
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a minimal reproducible example of the bug.
It looks like this is probably a regression from PR #24562. In useMenu.tsx, previously it was spreading ...props
, which let the prop values override the default value for openOnHover
. However, with the PR, it's not letting props.openOnHover
override the default.
The fix should be relatively straightforward. I'll make a PR.