Open
Description
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:
- Create a component with cdkConnectedOverlay
- Add it to your application
- Browse to your angular app on a mobile device a
- Open the overlay -> this should be correct positioned
- Scroll down (the browser hides the address bar)
- 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