Open jmkenz opened 8 years ago
I'm still getting this error all over the place when using panels as well. If someone finds an answer to this, I'd love to hear about it.
Another fix is to wrap the publish in a $timeout. The time can be set to 0.
$timeout(function(){ FoundationApi.publish('static-alert-message', 'open') }, 0);
I still get the same error with a publish for show/hide/toggle a POPUP.
Also tried to update to version 1.2.0 but it did not solve the issue. Impossible to programmatically manage a Popup.
The fix to wrap in a $timeout did not work for me. I don't get the error anymore, but the publish doesn't have any effect (nothing gets opened/closed)
For example, if have a notification like so:
zf-notification-static id="static-alert-message"
That gets opened like so:
FoundationApi.publish('static-alert-message', 'open')
Which triggers an '$apply already in progress' error.
Suggested fix to notification.js, line 255:
if (!scope.$root.$$phase) { scope.$apply(); }