Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
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

@nikclayton

Description

@nikclayton

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:

  1. The placeholder text "Enter something" appears in red.
  2. The form field is underlined in red.
  3. 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): *

If you change that to $animate.enabled(true) the errors will start appearing again.

Angular Versions: *

  • Angular Version: 1.5.x
  • Angular Material Version: 1.1.x

Additional Information:

  • Browser Type: * Chrome.
  • Browser Version: * 55.0.2883.87
  • OS: * Ubuntu 14.04
  • Stack Traces: N/A

Metadata

Metadata

Assignees

Labels

P2: requiredIssues that must be fixed.g3: reportedThe issue was reported by an internal or external product team.resolution: fixedseverity: regressionThis issue is related to a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions