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

Writing fast in input breaks ng-messages #4685

Closed
tniezurawski opened this issue Sep 17, 2015 · 9 comments
Closed

Writing fast in input breaks ng-messages #4685

tniezurawski opened this issue Sep 17, 2015 · 9 comments
Assignees
Milestone

Comments

@tniezurawski
Copy link

Hello,

I've prepared 3 examples in this plunker for you guys:
http://plnkr.co/edit/I2BzzAbGySn1d6wVOK1E?p=preview

If you write fast in input it breaks in showing ng-messages correctly. To show you that this is not connected with ng-pattern I've prepared an example without using angular-material and different approach to resolve the same problem.

I guess it is probably connected with animation and changing the state of input with delay.

@ThomasBurleson
Copy link
Contributor

@topherfangio - I think we need to debounce the change trigger for ng-messages and animations.

@topherfangio
Copy link
Contributor

@ThomasBurleson The animations are all CSS-based and are kicked off when the error messages appear. I'm not sure we can really control that on our end unless we hack ng-messages. Thoughts?

Also, two quick points:

  1. It appears this is reproducible in 0.11.0 and 0.10.1, but not 0.10.0, so it was introduced between then
  2. A quick fix is to add ng-model-options="{debounce: 100}" to your input

@tniezurawski
Copy link
Author

Thanks guys for replaying.

@topherfangio:

  1. Agree. In fact my team work with version 0.10.1.
  2. It kind of works but it is still "hacky". It's harder to reproduce the bug but it is still possible.

@topherfangio
Copy link
Contributor

I'll see if I can run git bisect and track down the commit that actually introduced the issue in 0.10.1 so we can see why it's breaking and if there is something we can do about it.

@topherfangio
Copy link
Contributor

@tniezurawski Please see my linked issue in the main Angular repo for an update.

@petebacondarwin
Copy link
Contributor

I think I have a fix here angular/angular.js#12903

@topherfangio
Copy link
Contributor

@petebacondarwin I just tested the changes and it appears to have solved this issue. Thanks so much!

@ThomasBurleson What is the best way to track this so that we close the issue when we switch to 1.4.7?

@ThomasBurleson
Copy link
Contributor

  • Reset Milestone to v0.12,
  • leave open until we change the config/build.config.js.

@ThomasBurleson
Copy link
Contributor

This has been fixed and will be available in the next Angular 1.4.7 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants