Skip to content

Commit 5b39fa3

Browse files
seronalmhartington
authored andcommitted
fix(ionicPopups): properly handle async popups
Closes #4526. Closes #4061. Closes #4304. Closes #4339. Closes #4486. Closes #4299
1 parent ff91f00 commit 5b39fa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/angular/service/popup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
346346
};
347347

348348
self.remove = function() {
349-
if (self.removed || !$ionicModal.stack.isHighest(self)) return;
349+
if (self.removed) return;
350350

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

371371
if (popupStack.length > 0) {
372-
popupStack[popupStack.length - 1].hide();
373372
showDelay = config.stackPushDelay;
373+
$timeout(popupStack[popupStack.length - 1].hide, showDelay, false);
374374
} else {
375375
//Add popup-open & backdrop if this is first popup
376376
$ionicBody.addClass('popup-open');

0 commit comments

Comments
 (0)