# Multiple ionic popups freeze my app

**URL:** <https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398>\
**Category:** ionic-v1\
**Created:** [December 18, 2014, 1:46pm UTC](https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398 "2014-12-18T13:46:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mladen5](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mladen5/32/68585_2.png) [@mladen5](https://forum.ionicframework.com/u/mladen5)\
**Post date:** [December 18, 2014, 1:46pm UTC](https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398/1 "2014-12-18T13:46:37Z")

</div>

I am using ionic popup component in my app, and sometimes i need to display two or more popups one behind other one. On some occasions when multiple popups are fired, application freeze, background div is not removed.

---

<div class="post-metadata">

**Author:** ![maqeelqureshi](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@maqeelqureshi](https://forum.ionicframework.com/u/maqeelqureshi)\
**Post date:** [May 13, 2015, 11:47am UTC](https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398/2 "2015-05-13T11:47:14Z")

</div>

did you find any solution for this?

---

<div class="post-metadata">

**Author:** ![mladen5](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mladen5/32/68585_2.png) [@mladen5](https://forum.ionicframework.com/u/mladen5)\
**Post date:** [May 13, 2015, 1:04pm UTC](https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398/3 "2015-05-13T13:04:47Z")

</div>

I don’t know if it has been fixed, i just disabled opening new popup if old one is not closed first.

---

<div class="post-metadata">

**Author:** ![harmonics](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/harmonics/32/72903_2.png) [@harmonics](https://forum.ionicframework.com/u/harmonics)\
**Post date:** [September 2, 2015, 11:53am UTC](https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398/4 "2015-09-02T11:53:30Z")

</div>

I would love to see a fix for this issue. With ionic 1.1.0 I cannot open up multiple popups without freezing the whole program. In the promise following the “OK-click” nothing happens in my case, so I would expect the stacked popups to be closed subsequently.

Update: Just for the record, the bug is covered in this issue (including a preliminary fix):

> <https://github.com/ionic-team/ionic/issues/3131>

---

<div class="post-metadata">

**Author:** ![fatihky](https://avatars.discourse-cdn.com/v4/letter/f/eb8c5e/32.png) [@fatihky](https://forum.ionicframework.com/u/fatihky)\
**Post date:** [November 12, 2015, 11:29am UTC](https://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398/5 "2015-11-12T11:29:06Z")

</div>

Hi! I had the same issue, but I solved why it happens.  
First example working properly, second example blocks whole application.

```auto

function showAlert(title, message) {
  var alertPopup = $ionicPopup.alert({
    title: title,
    template: message
  });

  return alertPopup;
}

// first case, working properly
function firstCase() {
  showAlert('INFO', 'Test message 1');
  showAlert('INFO', 'Test message 2');
}

// second case, not working properly
function secondCase() {
  showAlert('INFO', 'Test message 1');
  setTimeout(function() {
    showAlert('INFO', 'Test message 2');
  }, 0);
}

```
