Skip to content

Commit

Permalink
fix(ionicPopups): properly handle async popups
Browse files Browse the repository at this point in the history
Closes #4526. Closes #4061. Closes #4304. Closes #4339. Closes #4486. Closes #4299
  • Loading branch information
seronal authored and mhartington committed Oct 27, 2015
1 parent ff91f00 commit 5b39fa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/angular/service/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
};

self.remove = function() {
if (self.removed || !$ionicModal.stack.isHighest(self)) return;
if (self.removed) return;

self.hide(function() {
self.element.remove();
Expand All @@ -369,8 +369,8 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
var showDelay = 0;

if (popupStack.length > 0) {
popupStack[popupStack.length - 1].hide();
showDelay = config.stackPushDelay;
$timeout(popupStack[popupStack.length - 1].hide, showDelay, false);
} else {
//Add popup-open & backdrop if this is first popup
$ionicBody.addClass('popup-open');
Expand Down

6 comments on commit 5b39fa3

@Zorgatone
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was waiting for this update :)

@mhartington
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to finally have time to review it!

@Zorgatone
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 lines changed, 6 issues closed 😊

@dhyegocalota
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job. Thanks

@iffifan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was about to report this :D

@sugir93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could any one help me, how to use it???

Please sign in to comment.