bug(CDK Overlay): cdkConnectedOverlay ConnectedPosition not correctly calculated after scrolling on mobile browser
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
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
Beitragsleitfaden
Rechercherichtung
Beginne mit der verlinkten StackBlitz-Reproduktion und dem Positionierungs-Einstiegspunkt cdkConnectedOverlay von CDK. Reproduziere das Problem in Chrome Android oder Safari iOS, indem du das Overlay öffnest, scrollst, um die Adressleiste auszublenden, und es erneut öffnest. Die Aufgabe ist abgeschlossen, wenn das verbundene Overlay nach Änderungen des mobilen Viewports korrekt positioniert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100