angular/angular.js — pull request #6910 by Narretz (2014-03-29 21:30:32+00:00)
Title: fix(ngEventDirs): blur and focus use $evalAysnc to prevent inprog errors

This fixes cases where ngFocus and ngBlur will throw $rootScope.inprog errors, because they have been called during an active digest. There are (at least) three scenarios where this can happen:

ng-click triggers focus() on an element that has ng-focus
ng-key* triggers blur() on an element that has ng-blur
moving an element with ng-blur in an ng-repeat in before the preceding item

There's some discussion about this in #5402

I'd say we give it a shot and see if it causes any problems. Using $evalAsync was suggested by @caitp in https://github.com/angular/angular.js/issues/4979#issuecomment-35659108 .

Fixes #5945
Closes #5402