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

$digest/$apply already in progress #396

Closed
maxcook opened this issue Jan 11, 2015 · 8 comments
Closed

$digest/$apply already in progress #396

maxcook opened this issue Jan 11, 2015 · 8 comments

Comments

@maxcook
Copy link

maxcook commented Jan 11, 2015

$apply already in progress
This error occurs on multiple js components. $apply() always needs a if (!scope.$root.$$phase) {.
Currently this check is only applied to the $apply in the notification.js. However it is always required since the Foundation API gets mostly called from angular controllers, so digest is usually already in progress.


and many more require
if (!scope.$root.$$phase) {

@AntJanus
Copy link
Contributor

I'll be adding these to all the pertinent directives as I build factories for them.

@AntJanus
Copy link
Contributor

It's been added to notification and modal. We'll add it as needed. I'll close this out.

@etcook
Copy link

etcook commented Feb 5, 2015

@AntJanus I'm getting this error when trying to open and close a panel.

@etcook
Copy link

etcook commented Feb 14, 2015

@AntJanus I'm consistently getting this error when I use

FoundationApi.publish('id', 'show');

Is there a workaround in the interim that I can use to squelch the errors?

Edit: It's a panel.

@etcook
Copy link

etcook commented Feb 27, 2015

@AntJanus Any update on this? I'm really sorry to keep bothering you.

@AntJanus
Copy link
Contributor

@etcook I'm currently off the project. I'll go ahead and reopen this issue for someone to check up on this.

@AntJanus AntJanus reopened this Feb 27, 2015
@jamieshark
Copy link
Contributor

Hey @etcook , I went ahead and added the additional conditional checks. This error is no longer showing up for me, but let me know if it still persists for you.

@ProLoser
Copy link

@jeanieshark @AntJanus this is now how you fix this sort of bug. You are fixing symptoms instead of problems.

You should hoist the $scope.$apply() to the top of the stack trace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

6 participants