Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(cdkMenu): cdkMenu is scrolled down when max-height is set #29776

Open
1 task
LukasSefcik opened this issue Sep 23, 2024 · 0 comments
Open
1 task

bug(cdkMenu): cdkMenu is scrolled down when max-height is set #29776

LukasSefcik opened this issue Sep 23, 2024 · 0 comments
Labels
area: cdk/menu P4 A relatively minor issue that is not relevant to core functions

Comments

@LukasSefcik
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using max-height on cdkMenu with overflow-y: auto, menu is scrolled down a bit when first shown.
Bad:
image
Good:
image

Reproduction

StackBlitz link: https://stackblitz.com/edit/gbirs4?file=src/example/cdk-menu-standalone-menu-example.html,src/example/cdk-menu-standalone-menu-example.css
Steps to reproduce:

  1. Add cdk menu with options with at least one cdkMenuHeaderItem.
  2. Set max-height on cdkMenu.
  3. Open menu.

Expected Behavior

Menu should not be scrolled at all.

Actual Behavior

Menu is scrolled a bit down.

Environment

  • Angular: 18.2.2
  • CDK/Material: 18.2.2
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS
@LukasSefcik LukasSefcik added the needs triage This issue needs to be triaged by the team label Sep 23, 2024
@amysorto amysorto added P4 A relatively minor issue that is not relevant to core functions area: cdk/menu and removed needs triage This issue needs to be triaged by the team labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/menu P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

2 participants