-
Notifications
You must be signed in to change notification settings - Fork 3.4k
input: ng-messages do not work if animation is disabled #10240
Comments
Suspect that cf7f21a is the culprit, which unconditionally uses $animate() to add new classes instead of checking to see if animation is enabled. |
@nikclayton Correct. I'm the process of moving the animations to pure CSS. It just needs more testing but I'll probably have it ready for today. The reason why we moved to $animate was due to a flicker bug. We can now move back to CSS because of the newer ng-enter-prepare class that was added since. |
With commit cf7f21a, animations were moved to input.js in response to an ng-enter flicker issue with Angular 1.4.x. While the flicker was fixed, new animation bugs arised. Angular 1.4.x added and backported a ng-enter-prepare to avoid this bug. * Remove JS animations for input messages * Use `.ng-enter-prepare` to avoid flicker on Angular 1.4+ * Use `.ng-enter:not(ng-enter-active)` to prepare animations on 1.3+ and below * Update spec tests to use getComputedStyle instead of ngAnimate Fixes #6767, #9543, #9723, #10240 Related: angular/angular.js#13408
With commit cf7f21a, animations were moved to input.js in response to an ng-enter flicker issue with Angular 1.4.x. While the flicker was fixed, new animation bugs arised. Angular 1.4.x added and backported a ng-enter-prepare to avoid this bug. * Remove JS animations for input messages * Use `.ng-enter-prepare` to avoid flicker on Angular 1.4+ * Use `.ng-enter:not(.ng-enter-active)` to prepare animations on 1.3+ and below * Update spec tests to use getComputedStyle instead of ngAnimate Fixes #6767, #9543, #9723, #10240 Related: angular/angular.js#13408
With commit cf7f21a, animations were moved to input.js in response to an ng-enter flicker issue with Angular 1.4.x. While the flicker was fixed, new animation bugs arised. Angular 1.4.x added and backported a ng-enter-prepare to avoid this bug. * Remove JS animations for input messages * Use `.ng-enter-prepare` to avoid flicker on Angular 1.4+ * Use `.ng-enter:not(.ng-enter-active)` to prepare animations on 1.3 and below * Update spec tests to use getComputedStyle instead of ngAnimate Fixes #6767, #9543, #9723, #10240 Related: angular/angular.js#13408
With commit cf7f21a, animations were moved to input.js in response to an ng-enter flicker issue with Angular 1.4.x. While the flicker was fixed, new animation bugs arised. Angular 1.4.x added and backported a ng-enter-prepare to avoid this bug. * Use `.ng-enter-prepare` to avoid flicker on Angular 1.4+ * Use `.ng-enter:not(.ng-enter-active)` to prepare animations on 1.3 and below Fixes #6767, #9543, #9723, #10240 Related: angular/angular.js#13408
With commit cf7f21a, animations were moved to input.js in response to an ng-enter flicker issue with Angular 1.4.x. While the flicker was fixed, new animation bugs arised. Angular 1.4.x added and backported a ng-enter-prepare to avoid this bug. * Use `.ng-enter-prepare` to avoid flicker on Angular 1.4+ * Use `.ng-enter:not(.ng-enter-active)` to prepare animations on 1.3 and below * Update spec tests to use computedStyle Fixes #6767, #9543, #9723, #10240 Related: angular/angular.js#13408
I've removed the |
I updated the CodePen to |
Looks like it was fixed in 0151b4b The commit didn't closed the issue. I'm not entirely sure why. |
@clshortfuse thank you! It didn't close it because you need a |
Actual Behavior:
With a form like:
Everything works -- tab in to the field, tab out, and the field behaves as expected. Specifically:
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.xAdditional Information:
Browser Type: *
Chrome.Browser Version: *
55.0.2883.87OS: *
Ubuntu 14.04Stack Traces:
N/AThe text was updated successfully, but these errors were encountered: