ngMessage text is duplicated with ngAnimate when using $asyncValidators with low timeouts (<35ms)
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
ngMessage text is duplicated with ngAnimation
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
To reproduce:
- open fiddle: http://jsfiddle.net/rshift/cfq4fn6v/1/
- focus on input field
- press and hold 'a' (or any other key)
ngMessagetext will be printed many times
What is the expected behavior?
Must be printed only one ngMessage text
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
angular.js 1.58 Chrome Version 53.0.2785.143 (64-bit)
Also, I have tested it with 1.6.0.rc-0 and current master branch (HEAD was 3b7f29ff63e8bf02327a1430dcc2a4c83915a206) without success - issue still reproduces.
I was just playing around with this because I thought another fix to ngMessages we are working on would fix this too, but that wasn't the case. However, here's a plunker with an ngMessages version that includes the changes to https://github.com/angular/angular.js/pull/16406 and also a listener that checks takes into account the async operations when ngAnimate is included: http://plnkr.co/edit/FsKzynDxthKaNfPEtQUd?p=preview
It reduces the duplication, but not completely.