This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
input: ng-messages do not work if animation is disabled #10240
Copy link
Copy link
Closed
Labels
P2: requiredIssues that must be fixed.Issues that must be fixed.g3: reportedThe issue was reported by an internal or external product team.The issue was reported by an internal or external product team.resolution: fixedseverity: regressionThis issue is related to a regressionThis issue is related to a regression
Milestone
Description
Actual Behavior:
With a form like:
<form name="f">
<md-input-container class="md-block">
<label>Some text</label>
<input type="text" name="i" placeholder="Enter something" required />
<div ng-messages="f.i.$error">
<div ng-message="required">This field is required.</div>
</div>
</md-input-container>
</form>
Everything works -- tab in to the field, tab out, and the field behaves as expected. Specifically:
- The placeholder text "Enter something" appears in red.
- The form field is underlined in red.
- The text "This field is required." appears underneath the field.
However, if your app turns off animation by, for example, injecting a $animate instance and calling $animate.enabled(false), (1) and (2) still occur, but (3) no longer happens -- the ng-message does not appear.
This is a regression from 1.0, where it did work.
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:
http://codepen.io/anon/pen/dNYKwrDetails:
That codepen is identical to the one at https://material.angularjs.org/latest/demo/input (the "Errors Advanced" section). All I've done is change the controller to inject$animate
, set$scope.showHints = false
, and then called$animate.enabled(false);
.
If you change that to $animate.enabled(true)
the errors will start appearing again.
Angular Versions: *
Angular Version:
1.5.xAngular Material Version:
1.1.x
Additional Information:
Browser Type: *
Chrome.Browser Version: *
55.0.2883.87OS: *
Ubuntu 14.04Stack Traces:
N/A
matt-snider and Splaktar
Metadata
Metadata
Assignees
Labels
P2: requiredIssues that must be fixed.Issues that must be fixed.g3: reportedThe issue was reported by an internal or external product team.The issue was reported by an internal or external product team.resolution: fixedseverity: regressionThis issue is related to a regressionThis issue is related to a regression