angular / angular/components

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

Open
#16,404 0 comments 12 reactions 0 assignees View on GitHub
area: cdk/overlay P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### 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`

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and trace the Angular CDK OverlayConfig and BlockScrollStrategy behavior involved in sizing the pane and container. Done means the overlay fits its container after body scrolling and the bottom of the last overlay item can be reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.