-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Debounced ng-model-options in v1.6.* fires $digests on each keypress (worked fine in v1.5.*) #16057
Comments
+1 |
2 similar comments
+1 |
+1 |
Guys, stop commenting with +1 - this is what the reactions are for. |
I think this was caused by c9dffde#diff-7e6919ccdaa77645580e865e271080eeR89. That |
@jbedard Thanks for investigating. This looks like the most likely culprit. I have no idea how to fix this, though. Maybe we can special case a noop callback? |
I thought of that (special case for noop), but but would be a bit of a breaking change to Only other thing I've thought of is creating a (private, for now) |
…imeout/$interval Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously `.catch(noop)` was used on the rejected timeout/interval to prevent an unhandled rejection error. However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. Fixes angular#16057
Previously, `.catch(noop)` was used on a rejected timeout/interval to prevent an unhandled rejection error (introduced in #c9dffde1cb). However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. For unit testing, this means that it's no longer necessary to use `$timeout.flush()` when a `$timeout` has been cancelled outside of a digest. Previously, this was necessary to execute the deferred task added by `.catch(noop). There's an example of such a change in this commit's changeset in the file `/test/ngAnimate/animateCssSpec.js`. Fixes #16057 Closes #16064
Previously, `.catch(noop)` was used on a rejected timeout/interval to prevent an unhandled rejection error (introduced in #c9dffde1cb). However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. For unit testing, this means that it's no longer necessary to use `$timeout.flush()` when a `$timeout` has been cancelled outside of a digest. Previously, this was necessary to execute the deferred task added by `.catch(noop). There's an example of such a change in this commit's changeset in the file `/test/ngAnimate/animateCssSpec.js`. Fixes #16057 Closes #16064
I'm submitting a ...
Current behavior:
Video here: https://www.screencast.com/t/TFhK7wyaG !!!
Angular 1.6.* - with ng-model-options="{debounce:1000}" fires $digest cycles on each keypress.
Angular 1.5.* - works perfect!
https://codepen.io/anon/pen/BZQQMG?editors=1010
https://codepen.io/anon/pen/EXNNqN?editors=1010
Expected / new behavior:
ng-model-options
should work in Angular 1.6.* as it worked in Angular 1.5.*.Minimal reproduction of the problem with instructions:
Angular version: 1.6.* has bug (worked fine in 1.5.*)
Browser: [all]
Anything else:
The text was updated successfully, but these errors were encountered: