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

Commit

Permalink
fix(input): fix invalid animation for input.
Browse files Browse the repository at this point in the history
At the moment the animation will stuck if there is no `md-auto-hide` class or the class isn't `md-input-invalid`.
That's because we not trigger the callback if we finish the animation.

Fixes #6822. Closes #6880
  • Loading branch information
devversion authored and ThomasBurleson committed Jan 28, 2016
1 parent 64911ab commit 7a98d7b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/input/demoErrors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@
{{projectForm.rate.$viewValue | currency:"$":0}} an hour? That's a little ridiculous. I
doubt event Bill Clinton could afford that.
</div>

Make sure to include <a href="https://docs.angularjs.org/api/ngMessages" target="_blank">angular-messages</a> module when using ng-message.
</div>
<p>
Make sure to include <a href="https://docs.angularjs.org/api/ngMessages" target="_blank">ngMessages</a> module when using ng-message markup.
</p>
</md-input-container>
</form>
</md-content>
Expand Down
7 changes: 7 additions & 0 deletions src/components/input/demoErrors/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
.inputErrorsApp { min-height:48px; }


md-input-container > p {
font-size: 0.8em;
text-align: left;
width:100%;
}
2 changes: 2 additions & 0 deletions src/components/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ function mdInputInvalidMessagesAnimation($q, $animateCss) {

if (className == "md-input-invalid" && messages.hasClass('md-auto-hide')) {
showInputMessages(element, $animateCss, $q).finally(done);
} else {
done();
}
}

Expand Down

0 comments on commit 7a98d7b

Please sign in to comment.