[Bug]: Menu - opening menu with arrow down unexpectedly scrolls the menu list if there is scrollbar
Library
React Components / v9 (@fluentui/react-components)
System Info
any system in the universe
Are you reporting an Accessibility issue?
no
Reproduction
https://stackblitz.com/edit/t42dzs?file=src%2Fexample.tsx
Bug Description
Actual Behavior
Menu opens and it is scrolled
Expected Behavior
Menu opens without any scrolling
Logs
No response
Requested priority
High
Products/sites affected
No response
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.
Workaround: add preventDefault to onKeyDown:
<MenuButton
onKeyDown={(e) => {
if (e.key === 'ArrowDown') {
e.preventDefault();
}
}}
>
Trigger
</MenuButton>
Remove <MenuPopover> and add custom CSS
Seems to be fixed now. When I go to the stackblitz,it works fine.
https://github.com/user-attachments/assets/327b7461-7ed6-44c0-b05a-da66a018b0b0
This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".
Because this reported issue has not had any activity for over 180 days, we're automatically closing it for house-keeping reasons.
Still require assistance? Please, create a new issue with up-to date details and latest version of Fluent.