angular / angular/components

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

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

描述

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

贡献指南

打开贡献指南

调研方向

通过打开对话框、调用 mdDialogRef.close(),然后立即导航到另一条路由来重现该问题。跟踪对话框关闭生命周期和 cdk-global-scrollblock 清理过程;当该 class 从 document 中移除,并且导航后仍可以滚动时,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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