bug(scrolling): Opening dialog in window virtual scroll break scrolling
- 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?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
[cdk-virtual-scroll-viewport[scrollWindow]](https://material.angular.io/cdk/scrolling/api#CdkVirtualScrollableWindow) is empty when opening a `mat-dialog` if the window have been scrolled.
When the dialog is closed, everything returns to normal but the scroll is restored to top 0.
### Reproduction
Steps to reproduce:
1. Go to https://stackblitz.com/edit/angular-psylrc
2. Click on "open dialog" button of the 100th line
### Expected Behavior
The virtual scroll should not be influenced by dialog
### Actual Behavior
Virtual scroll container become empty and when the dialog is closed the items come back but the scroll is restored to 0
### Environment
- Angular: 15.0.2
- CDK/Material: 15.0.2
- Browser(s): any
- Operating System (e.g. Windows, macOS, Ubuntu): any
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz e inspecciona la interacción entre cdk-virtual-scroll-viewport[scrollWindow] y mat-dialog después de desplazarte hasta la línea 100. Reproduce el viewport vacío y el restablecimiento del desplazamiento a 0; después, verifica que abrir y cerrar el diálogo deje el desplazamiento virtual poblado en su posición original.
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
- 35/100