# Issue when opening a popup from a popup

**URL:** <https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397>\
**Category:** uncategorized\
**Created:** [September 14, 2015, 6:17pm UTC](https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397 "2015-09-14T18:17:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pattyok](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pattyok](https://forum.ionicframework.com/u/pattyok)\
**Post date:** [September 14, 2015, 6:17pm UTC](https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397/1 "2015-09-14T18:17:55Z")

</div>

We have a scenario where we end up opening one popup from another popup. When we do this, the first one does not get removed from the DOM so even though it appears as though all popups are closed, you cannot click any other buttons on the page.

Furthemore if you click where the popup was, the 2nd popup re-opens. This was working fine before we upgraded to 1.1. It also appears to be a bug in the nightlies…

Here’s an example

> **[Popup: Bug on opening popup from popup](https://codepen.io/pattyok/pen/ZbQemP)**
>
> Various popups supported by Ionic Forked from \[Ionic\](http://codepen.io/ionic/)'s Pen \[Popup: Nightly\](http://codepen.io/ionic/pen/zkmhJ/)....

---

<div class="post-metadata">

**Author:** ![pattyok](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pattyok](https://forum.ionicframework.com/u/pattyok)\
**Post date:** [September 14, 2015, 6:31pm UTC](https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397/2 "2015-09-14T18:31:28Z")

</div>

So I solved this by wrapping the call to the new popup in a $timeout…

---

<div class="post-metadata">

**Author:** ![luisito95](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@luisito95](https://forum.ionicframework.com/u/luisito95)\
**Post date:** [September 14, 2015, 7:15pm UTC](https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397/3 "2015-09-14T19:15:46Z")

</div>

Thats kinda wierd I’m curious to know why that happens. Tried calling some myPopup.close() here and there to see if that fixed it but no…

---

<div class="post-metadata">

**Author:** ![rajil](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@rajil](https://forum.ionicframework.com/u/rajil)\
**Post date:** [September 15, 2015, 7:21am UTC](https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397/4 "2015-09-15T07:21:14Z")

</div>

Faced same issue. Opening multiple popover from popover are not getting closed in ionic 1.1. They are getting closed in 1.0.

---

<div class="post-metadata">

**Author:** ![did](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@did](https://forum.ionicframework.com/u/did)\
**Post date:** [September 28, 2015, 1:46pm UTC](https://forum.ionicframework.com/t/issue-when-opening-a-popup-from-a-popup/32397/5 "2015-09-28T13:46:20Z")

</div>

☹ I have the same problem, after update to 1.1.0 the popup handling changed,  
a similar issue was already reported:

> **[Multiple ionic popups freeze my app](http://forum.ionicframework.com/t/multiple-ionic-popups-freeze-my-app/14398/4)**
>
> 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...

I will also try the solution to encapsulate $ionicPopup in my own service to check if there is already an opened popup, which is closed before the new one is opened

hopefully ionic will fix it again
