angular / angular/components

bug(cdk/overlay): scroll blocking overlay persists when documentElement shrinks to the point it is not needed

オープン
#30,943 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: cdk/overlay P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Description

This came up for an app that had a button to launch a full screen dialog. When you click the button it essentially hides the main app and launches the dialog. However, at the time the dialog launches, the content is still showing so it calculates the height based on documentElement here (https://github.com/angular/components/blob/main/src/cdk/overlay/scroll/block-scroll-strategy.ts#L111) and determines the scroll blocking class is needed. The main content then disappears making the blocking class unnecessary, but it never updates after the initial calculation. This results in a disabled scrollbar being shown in the app.

As a workaround, apps in this situation should ensure that they remove content they want to hide & wait for that change to be rendered in the DOM before launching the dialog.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/cdk/overlay/scroll/block-scroll-strategy.ts の 111 行目付近から始めます。ここでは、スクロールをブロックする必要があるかどうかを判断するために documentElement のサイズが使われています。メインコンテンツがまだ存在している状態でフルスクリーンダイアログを起動し、その後そのコンテンツを非表示にして、この一連の動作を再現します。不要なブロック状態が残らず、無効化されたスクロールバーも表示されなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。