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

Commit 0eb7d8a

Browse files
topherfangiojelbourn
authored andcommitted
fix(input): Fix input errors CSS to properly display.
Due to a CSS property that was not restrictive enough, standard error messages were hidden by default. Restrict CSS to components with the `md-auto-hide` class. Also, remove the `md-maxlength` requirement from the errors demo to reduce confusion. Fixes #5837. References #5321. Closes #6298
1 parent 9a33d1c commit 0eb7d8a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/components/input/demoErrors/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<md-input-container class="md-block">
3636
<label>Hourly Rate (USD)</label>
3737
<input required type="number" step="any" name="rate" ng-model="project.rate" min="800"
38-
max="4999" ng-pattern="/^1234$/" md-maxlength="20" />
38+
max="4999" ng-pattern="/^1234$/" />
3939

4040
<div ng-messages="projectForm.rate.$error" multiple md-auto-hide="false">
4141
<div ng-message="required">

src/components/input/input.scss

+11-1
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,18 @@ md-input-container {
250250
}
251251
}
252252

253+
// Note: This is a workaround to fix an ng-enter flicker bug
254+
.md-auto-hide {
255+
.md-input-message-animation {
256+
&:not(.ng-animate) {
257+
opacity: 0;
258+
margin-top: -100px;
259+
}
260+
}
261+
}
262+
253263
.md-input-message-animation {
254-
&.ng-enter, &:not(.ng-animate) {
264+
&.ng-enter {
255265
opacity: 0;
256266
margin-top: -100px;
257267
}

0 commit comments

Comments
 (0)