bug(CDK Overlay): cdkConnectedOverlay ConnectedPosition not correctly calculated after scrolling on mobile browser
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
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
コントリビューションガイド
調査の方向性
リンクされている StackBlitz の再現手順と、CDK の cdkConnectedOverlay の配置エントリーポイントから始めます。Chrome Android または Safari iOS で overlay を開き、アドレスバーを隠すためにスクロールしてから、もう一度開いて問題を再現します。モバイル viewport の変更後も connected overlay が正しく配置されたままになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100