fix(input): don't animate label when value is set programmatically (#3691)

This commit is contained in:
mmalerba
2017-03-27 10:16:56 -07:00
committed by Jeremy Elbourn
parent 5c2b44903d
commit dc5c869ffb
+7
View File
@@ -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
@@ -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 {