bug(scrolling): Opening dialog in window virtual scroll break scrolling
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### 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
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現手順から始め、100 行目までスクロールした後の cdk-virtual-scroll-viewport[scrollWindow] と mat-dialog の相互作用を調査します。空の viewport とスクロール位置が 0 に復元される状態を再現し、その後、ダイアログを開いて閉じても、仮想スクロールの内容が元の位置に表示されたままになることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100