Skip to content

Commit

Permalink
fix(input): don't animate label when value is set programmatically (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba authored and jelbourn committed Mar 27, 2017
1 parent 5c2b449 commit dc5c869
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/input/input-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ $mat-input-underline-disabled-background-image:
// Assumes the autofill is non-empty.
&:-webkit-autofill + .mat-input-placeholder-wrapper .mat-float {
@include mat-input-placeholder-floating;
transition: none;
}

// Note that we can't use something like visibility: hidden or
Expand Down Expand Up @@ -160,6 +161,12 @@ $mat-input-underline-disabled-background-image:
}
}

// Disable the placeholder animation when the input is not empty (this prevents placeholder
// animating up when the value is set programmatically).
.mat-input-placeholder:not(.mat-empty) {
transition: none;
}

// Used to hide the placeholder overflow on IE, since IE doesn't take transform into account when
// determining overflow.
.mat-input-placeholder-wrapper {
Expand Down

0 comments on commit dc5c869

Please sign in to comment.