angular / angular/components

cdk-global-scrollblock not removed when navigating while dialog is being closed

Open
#5,864 9 comments 0 reactions 0 assignees View on GitHub
area: cdk/scrolling area: material/dialog P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
cdk-global-scrollblock is removed from document when the router navigates to a new route while the dialog is being closed (not yet tested if the same happens while navigating when a dialog is open)

#### What is the current behavior?
When navigating while closing the dialog, the class cdk-global-scrollblock will not be removed from document and scrolling is not possible anymore.

#### What are the steps to reproduce?
Open a dialog, call this.mdDialogRef.close() and immediately navigate to a different route. It can be solved easily by observing this.mdDialogRef.afterClosed but I think that the framework should ensure that cdk-global-scrollblock gets removed when navigating.

#### What is the use-case or motivation for changing an existing behavior?

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.3.0
Material: 2.0.0-beta.8-dd230a3
CDK: 2.0.0-beta.8-dd230a3
OS: Linux
Typescript: 2.3.4
Browsers: Chrome

#### Is there anything else we should know?

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by opening a dialog, calling mdDialogRef.close(), and navigating immediately to another route. Trace the dialog closing lifecycle and cdk-global-scrollblock cleanup; done means the class is removed from document and scrolling remains possible after navigation.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.