angular / angular/components

ripples (mat-checkbox, mat-option, etc...) cause scrolling in dialog

未关闭
#8,798 15 条评论 17 个 reaction 已指派 0 人 在 GitHub 查看
area: material/checkbox area: material/dialog G needs: discussion P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Bug, feature request, or proposal:
If a mat-checkbox is the last element in a mat-dialog-content it will cause the dialog to to have a scrollbar, even if the content has not reached it's max height.

#### What is the expected behavior?

There should be no scrolling if the dialog has room to grow.

#### What is the current behavior?

The dialog scrolls when a mat-checkbox is present.

#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-dhosn1

Click the button, notice the dialog.

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

It looks bad.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Whatever is used by stackblitz

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

贡献指南

打开贡献指南

调研方向

首先在链接的 StackBlitz 示例中重现该问题,然后检查 mat-dialog-content 与 mat-checkbox 的 ripple 之间的交互,尤其是在复选框是最后一个元素时。当存在 mat-checkbox 或类似的带 ripple 组件时,一个仍有扩展空间的对话框不再出现滚动条,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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