# Ionic framework two popups in tandem

**URL:** <https://forum.ionicframework.com/t/ionic-framework-two-popups-in-tandem/8477>\
**Category:** ionic-v1\
**Created:** [August 20, 2014, 12:49pm UTC](https://forum.ionicframework.com/t/ionic-framework-two-popups-in-tandem/8477 "2014-08-20T12:49:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adorosty](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@adorosty](https://forum.ionicframework.com/u/adorosty)\
**Post date:** [August 20, 2014, 12:49pm UTC](https://forum.ionicframework.com/t/ionic-framework-two-popups-in-tandem/8477/1 "2014-08-20T12:49:27Z")

</div>

I have an ionic app where the user taps a button, then a popup shows up and then the user taps a button in the popup and another one shows up. **This works fine in the browser** but when I deploy it to an android device, after the second popup closes the page freezes and I can no longer tap the main button on the page.

Here’s a short but complete app demonstrating my problem.

```
<!DOCTYPE html>
<html>
<head>
<title>App</title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<!-- version 1.0.0-beta.9 -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script>
    angular.module("app", ["ionic"])
        .controller("controller", function ($scope, $ionicPopup, $timeout) {
            var popup1;

            $scope.popup1 = function () {
                popup1 = $ionicPopup.show({
                    template: '<button ng-click="popup2()">popup2</button>',
                    title: 'popup1',
                    scope: $scope
                });
            }

            $scope.popup2 = function () {
                $ionicPopup.alert({
                    title: "Popup 2"
                }).then(function () {
                    /*
                    $timeout(function () {
                        popup1.close();
                    });
                    */

                    popup1.close();
                });
            }
        });
</script>
</head>
<body ng-app="app" ng-controller="controller">
    <button ng-click="popup1()">popup1</button>
</body>
</html>
```

---

<div class="post-metadata">

**Author:** ![m\_abdelfattah](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/m_abdelfattah/32/64983_2.png) [@m\_abdelfattah](https://forum.ionicframework.com/u/m_abdelfattah)\
**Post date:** [August 31, 2015, 10:58pm UTC](https://forum.ionicframework.com/t/ionic-framework-two-popups-in-tandem/8477/2 "2015-08-31T22:58:36Z")

</div>

I’ve the same problem!
