angular / angular/components

.cdk-overlay-pane does not fit .cdk-overlay-container

未关闭
#16,404 0 条评论 12 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/overlay P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Reproduction

Steps to reproduce:
1. Open https://stackblitz.com/edit/angular-overlay-scroll
2. Scroll body
3. Press 'overlay' button


#### Expected Behavior

`.cdk-overlay-pane` fits `.cdk-overlay-container` if `BlockScrollStrategy` is used.

#### Actual Behavior

`.cdk-overlay-pane` does not fit `.cdk-overlay-container` if `BlockScrollStrategy` is used.
A part of `.cdk-overlay-pane` is out `.cdk-overlay-container`.
There is no way to scroll to the bottom of the last `.overlay-items__item`.
![image](https://user-images.githubusercontent.com/8931568/60344410-2c25f880-99bf-11e9-8f0b-b53deda63a53.png)

#### Environment

- Angular: 7, 8
- CDK/Material: 7, 8
- Browser(s): Google Chrome, Firefox, Opera
- Operating System (e.g. Windows, macOS, Ubuntu): Windows, macOS, Android

#### Suggest a Fix
I have found two ways to fix it.
1. Make `OverlayConfig#minHeight` required
2. Set default value of `OverlayConfig#minHeight`

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,跟踪 Angular CDK OverlayConfig 和 BlockScrollStrategy 在调整 pane 和 container 大小时涉及的行为。完成标准是:body 滚动后 overlay 能适应其 container,并且可以到达最后一个 overlay 项目的底部。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。