Webstaff focusMe directive suffers from indigestion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Evergreen 2.12
The "focusMe", "blurMe", and "selectMe" directives manually call scope.$apply to keep model values in sync with the state of the DOM. If these scope.$apply() calls happen while an Angular digest is already running, it results in lots of nasty repeating console errors:
angular.js:14199 Error: [$rootScope:inprog] http://
at angular.js:38
at n (angular.js:18357)
at m.$apply (angular.js:18092)
at HTMLInputElemen
at HTMLInputElemen
at HTMLInputElemen
at ui-bootstrap-
at angular.js:16696
at m.$eval (angular.js:17994)
at m.$digest (angular.js:17808)
To reproduce (for focusMe):
1. Open the JS console
2. Perform a patron search. I typically get 3 of these per search.
Running the scope.$apply() calls inside a $timeout, which gives the in-progress digest time to complete, prevents the errors from occurring. Branch en route.
Changed in evergreen: | |
milestone: | 2.12-rc → 2.12.0 |
Changed in evergreen: | |
status: | New → Confirmed |
assignee: | nobody → Kathy Lussier (klussier) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Fix pushed:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp1670512- focus-me- etc-digest- errors
To confirm, following the steps to reproduce (above), the console errors will no longer appear with the branch installed. And continuing the patron search example, the focus behavior still behaves as expected (default to last name focus, changing focus is possible / un-buggy).