bug(CDK Overlay): cdkConnectedOverlay ConnectedPosition not correctly calculated after scrolling on mobile browser
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
The ConnectedPositions for a cdkConnectedOverlay are not correctly calcullated when browsing and scrolling on a mobile browser. The mobile devices are hiding the address bar when you scroll down. This results in a change of the viewport sizes. If you open a cdkConnected overlay after scrolling it's position is at the wrong location.
#### Reproduction
https://stackblitz.com/edit/components-issue-mbxfr2
Steps to reproduce:
1. Create a component with cdkConnectedOverlay
2. Add it to your application
3. Browse to your angular app on a mobile device a
4. Open the overlay -> this should be correct positioned
5. Scroll down (the browser hides the address bar)
6. Overlay position is on wrong location
#### Expected Behavior
The connected overlay should be on the correct position after scrolling on a mobile device
#### Actual Behavior
The position of the overlay is calculated wrong and displayd at the wrong position.
The position of the overlay with the address bar (as expected)

The position of the overlay without the address bar, after scrolling (not as expected)

#### Environment
- Angular: 12
- CDK/Material: 12
- Browser(s): Chrome Android, Safari IOS
- Operating System: IOS, Android
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz y el punto de entrada de posicionamiento cdkConnectedOverlay de CDK. Reproduce el problema en Chrome Android o Safari iOS abriendo el overlay, desplazándote para ocultar la barra de direcciones y volviéndolo a abrir. Se considera completado cuando el overlay conectado permanece correctamente posicionado después de que cambie el viewport móvil.
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
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100