@ajp8164 wrote:
If I open a modal and then background the app (tested on iOS) and then bring the app back to the foreground - the modal is still displayed but is unresponsive to any touch events. I have to restart the app.
How do I prevent the app from freezing when returning from the background?
Modal presentation:
<ion-modal-view ng-controller="txDetailsController" on-swipe-right="cancel()"> <nav class="tab-bar" ng-style="{'background':skin.view.navBarBackground}"> <section class="left-small"> <a ng-click="cancel()" ng-style="{'color':skin.view.navBarButtonTextColor}"> <i class="icon-arrow-left3 icon-back"></i> <span class="text-back" translate>Back</span> </a> </section> <section class="middle tab-bar-section"> <h1 class="title ellipsis" ng-style="{'color':skin.view.navBarTitleColor}" translate> Transaction </h1> </section> </nav> <ion-content class="modal-content"> ... <ion-content> <ion-modal-view>
To open the modal:
this.openTxModal = function(btx) { var self = this; $scope.btx = btx; $scope.self = self; $ionicModal.fromTemplateUrl('views/modals/tx-details.html', { scope: $scope, backdropClickToClose: false, hardwareBackButtonClose: false, animation: 'animated slideInRight', hideDelay: 500 }).then(function(modal) { $scope.txDetailsModal = modal; $scope.txDetailsModal.show(); $rootScope.modalOpened = true; }); };
Posts: 1
Participants: 1