mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(input): don't animate label when value is set programmatically (#3691)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user