Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

datepicker with ng-focus throws $apply error #2789

Closed
martinstein opened this issue Oct 6, 2014 · 4 comments
Closed

datepicker with ng-focus throws $apply error #2789

martinstein opened this issue Oct 6, 2014 · 4 comments

Comments

@martinstein
Copy link

After the changes in issue #1922, the suggested fix for keeping the old "open on focus" behavior is to use is-open="dt.open" and ng-focus = "dt.open = true".

However, using ng-focus this way causes the datepicker to break with the error:

$apply already in progress
[$rootScope:inprog] http://errors.angularjs.org/undefined/$rootScope/inprog?p0=%24apply

This seems to be a problem for multiple people (in the discussion of #2149):
#2149 (comment)
#2149 (comment)
#2149 (comment)
#2149 (comment)

So, this looks important for many people, especially since it occurs because of the breaking changes of the #1922 fix.

@tschofen
Copy link

Stuck on this bug too...
I don't understand why this was totally removed. Shouldn't that be up to users of the module to determine how to handle accessibility issues?

pedroxs added a commit to pedroxs/bootstrap that referenced this issue Oct 16, 2014
Fix for issue angular-ui#2789 where it was throwing "$apply already in progress" when using ng-focus to open the popup.
@chrisirhc
Copy link
Contributor

This is resolved in AngularJS 1.3 . However, to fix this for older versions, we can use the fix described in angular/angular.js@54f0bc0 .

It's likely we'll move forward with AngularJS 1.3 soon so a fix for this may not be needed once the new release with the AngularJS 1.3 releases is cut. I'll leave this open until then or if someone once to submit a fix before the 1.3 transition.

@alexszilagyi
Copy link

@chrisirhc: could you please tell me if there's any update on this bug? I'm using latest version (1.3.11) and seems to persist.

@wesleycho
Copy link
Contributor

Closing this, as we are moving to Angular 1.3 with 0.13.0.

@karianna karianna modified the milestones: 0.13.0, Purgatory Apr 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants