angular / angular/components

bug(Select): Select menu height shrinks when scrolling

Abierto
#30,901 2 comentarios 1 reacción 0 asignados Ver en GitHub
area: material/select P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Is this a regression?

- [x] 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
https://github.com/angular/components/issues/18168
https://github.com/angular/components/pull/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](https://github.com/user-attachments/assets/46a83001-4e12-4891-82c1-1742217bda1f)

### Environment

- Angular: 19.2.7,
- CDK/Material: 19.2.10
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz y sigue el componente Select mientras desplazas la página con el menú abierto. Compara la altura del menú cuando sale del viewport y vuelve a entrar en él; se considera terminado cuando la altura vuelve a expandirse después de desplazarte de nuevo hasta que sea visible, tal como se describe en el comportamiento esperado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.