fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Bug]: Menu - opening menu with arrow down unexpectedly scrolls the menu list if there is scrollbar

Open jurokapsiar opened this issue 1 year ago • 2 comments

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.

jurokapsiar avatar Aug 23 '24 08:08 jurokapsiar

menu_arrow

micahgodbolt avatar Aug 23 '24 20:08 micahgodbolt

Workaround: add preventDefault to onKeyDown:

          <MenuButton
            onKeyDown={(e) => {
              if (e.key === 'ArrowDown') {
                e.preventDefault();
              }
            }}
          >
            Trigger
          </MenuButton>

miroslavstastny avatar Aug 26 '24 14:08 miroslavstastny

Remove <MenuPopover> and add custom CSS

swapanmandi avatar Sep 06 '24 18:09 swapanmandi

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

FrietStoofvlees avatar Jan 09 '25 09:01 FrietStoofvlees

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.