-
Notifications
You must be signed in to change notification settings - Fork 27.5k
$digest error when using ng-blur in an ng-if #4979
Comments
A plunker demonstrating this (perhaps with $timeout if you don't want to get into using $http in the demo) would be useful. |
As mentioned in #6364, the |
related #5945 I tried the example in the above issue with $evalAsync and it works. Might have to try with other issues. Pull request wanted? |
I can't reproduce this in a plunkr: Neither httpBackend mocks nor timeout show the problem. Note also that the description does not match the example code: the blur should be on the element that is initially displayed. |
The same problem exists in ngModelDirective's post method. Doesn't look like it's fixed by PR 6910 |
Ok, I will create a PR too that always uses
Even if we are outside of angular and someone causes a |
…$evalAsync` BREAKING CHANGE: The `blur` and `focus` event fire synchronously, also during DOM operations that add/remove elements. This lead to errors as the Angular model was not in a consistent state. This change executes the expression of those events now asynchronously. Related to angular#5945 Fixes angular#4979
…$evalAsync` BREAKING CHANGE: The `blur` and `focus` event fire synchronously, also during DOM operations that add/remove elements. This lead to errors as the Angular model was not in a consistent state. This change executes the expression of those events now asynchronously. Fixes angular#4979 Fixes angular#5945 Closes angular#8803 Closes angular#6910 Closes angular#5402
…$evalAsync` BREAKING CHANGE: The `blur` and `focus` event fire synchronously, also during DOM operations that remove elements. This lead to errors as the Angular model was not in a consistent state. See this [fiddle](http://jsfiddle.net/fq1dq5yb/) for a demo. This change executes the expression of those events using `scope.$evalAsync` if an `$apply` is in progress, otherwise keeps the old behavior. Fixes angular#4979 Fixes angular#5945 Closes angular#8803 Closes angular#6910 Closes angular#5402
…$evalAsync` BREAKING CHANGE: The `blur` and `focus` event fire synchronously, also during DOM operations that remove elements. This lead to errors as the Angular model was not in a consistent state. See this [fiddle](http://jsfiddle.net/fq1dq5yb/) for a demo. This change executes the expression of those events using `scope.$evalAsync` if an `$apply` is in progress, otherwise keeps the old behavior. Fixes angular#4979 Fixes angular#5945 Closes angular#8803 Closes angular#6910 Closes angular#5402
…$evalAsync` BREAKING CHANGE: The `blur` and `focus` event fire synchronously, also during DOM operations that remove elements. This lead to errors as the Angular model was not in a consistent state. See this [fiddle](http://jsfiddle.net/fq1dq5yb/) for a demo. This change executes the expression of those events using `scope.$evalAsync` if an `$apply` is in progress, otherwise keeps the old behavior. Fixes #4979 Fixes #5945 Closes #8803 Closes #6910 Closes #5402
I have two input fields both set to autofocus. Each input field is inside an ng-if condition that is mutually exclusive. The condition starts out false showing the one input field, and when an http call finishes, the condition is set to true, removing one DOM and showing the other. When the initial one gets hid, it triggers the ng-blur event, but I get this exception:
HTML
Script
The text was updated successfully, but these errors were encountered: