Skip to content

bug(Select): Select menu height shrinks when scrolling #30901

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

Open
1 task
Accir opened this issue Apr 18, 2025 · 2 comments · May be fixed by #30902
Open
1 task

bug(Select): Select menu height shrinks when scrolling #30901

Accir opened this issue Apr 18, 2025 · 2 comments · May be fixed by #30902
Labels
needs triage This issue needs to be triaged by the team

Comments

@Accir
Copy link

Accir commented Apr 18, 2025

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 select menu is opened and scrolled out of view it's height becomes really small. When scrolling back into view the height never increases and stays small.

This issue is similar to already fixed issue in mat-menu component
#18168
#21436

Reproduction

StackBlitz link: https://stackblitz.com/edit/zdrajstd?file=src%2Fexample%2Fselect-custom-trigger-example.html
Steps to reproduce:

  1. Create a page large enough where you can scroll
  2. Add a select component with a few options in the middle of the page
  3. Scroll through the page while the select is open

Expected Behavior

Select menu height should increase when scrolled back into view

Actual Behavior

Select menu height doesn't increase and stays small.

Image

Environment

  • Angular: 19.2.7,
  • CDK/Material: 19.2.10
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@Accir Accir added the needs triage This issue needs to be triaged by the team label Apr 18, 2025
@crisbeto
Copy link
Member

This is due to #30628. cc @andrewseguin

SergheiGurgurov added a commit to SergheiGurgurov/components that referenced this issue Apr 18, 2025
Fixes a bug in the select component that makes it shrink on scroll
and not grow back when it get's back into view

Fixes angular#30901
@SergheiGurgurov
Copy link

Hello there, i felt i could take on the fix,
i just added growAfterOpen to the position strategy of the overlay to match the behaviour of the mat-menu which had the same issue previously as mentioned by @Accir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants