Skip to content

md-checkbox inside <div md-dialog-content> shows vertical scrollbar #4764

Description

@julianobrasil

Bug, feature request, or proposal:

Bug, I think. New issue based on a closed one (#4748), to provide more details.

What is the expected behavior?

When you use a md-checkbox inside a <div md-dialog-content> container the vertical scrollbar must not be shown.

What is the current behavior?

The vertical scrollbar is beeing shown when you put the md-checkbox as the last component inside md-dialog-content (if you do not use md-dialog-content attribute, or if you do not put the md-checkbox as the last component, everything works just fine):

<div md-dialog-content>
  <div >
      test 1
  </div>
  <div >
      test 2
  </div>
  <div>
      <md-checkbox>This is a text test</md-checkbox>
  </div>
</div>

What are the steps to reproduce?

Just open a md-dialog with the above discribed setup. The result is shown in the image bellow the following plunker link.

plunker: https://plnkr.co/edit/pjTo0vekZfDV7eHEtsF6?p=preview

image

If you switch positions of the test 2 div and the md-checkbox div, the vertical scrollbar goes away:

image

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

Use the md-checkbox inside md-dialog

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

@angular/cli: 1.0.4
node: 6.10.3
os: win32 x64
@angular/animations: 4.1.3
@angular/cli: 1.0.4
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/compiler-cli: 4.1.3
@angular/core: 4.1.3
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/material: 2.0.0-beta.5
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/platform-server: 4.1.3
@angular/router: 4.1.3

Typescript: 2.3.2

Is there anything else we should know?

I've noticed that if I do not put the checkbox as the last component of the md-dialog-container in the plunker example, the scrollbar isn't shown. I faced the problem in Chrome 58.0.3029.110, and did not test in other browsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/checkbox

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions