Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

select: disabling fields adds a -1px margin, which causes page to jump around if there are multiple select fields being disabled #11812

@bersLucas

Description

@bersLucas

Bug, enhancement request, or proposal:

Disabling a <md-select> fields adds a -1px margin, which causes the page to jump around if there are multiple <md-select> items being disabled at once

CodePen and steps to reproduce the issue:

https://codepen.io/berslucas/pen/QWWpVPb

Detailed Reproduction Steps:

  1. Click on "Disable Fields"
  2. All select boxes push the page up

What is the expected behavior?

Select boxes should remain at the same position, but change color/opacity

What is the current behavior?

Select boxes gain a -1px top-margin

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

Element movement in the middle of an interaction

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: 1.7.8
  • AngularJS Material: 1.1.17
  • OS: OSX Mojave
  • Browsers: Chromium 77

Is there anything else we should know? Stack Traces, Screenshots, etc.

The solution for this is to remove margin-bottom: -1px; from the md-select[disabled] .md-select-value

md-select[disabled] .md-select-value {
    background-position: 0 bottom;
    background-size: 4px 1px;
    background-repeat: repeat-x;
    /* margin-bottom: -1px; */
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions