Weird temporary flash of modal when call to hide the modal


#1

I’m using 1.0.11 Beta. On one of my views, I have a button that displays a modal. Once I’m finished with the modal, I hit a button on the modal to hide the modal. The modal hides but the modal flashes for a half a sec and then disappears again. This seems like a weird modal flash effect for closing the modal. Does anyone know what could be causing this?

//homeCtrl.js

       Other Code...

       $ionicModal.fromTemplateUrl('Testing-modal.html', {
	    scope: $scope,
	    animation: 'fade-in',
	    hardwareBackButtonClose : true
	}).then(function(modal) {
	    $scope.modal = modal;
	});
	
	$scope.openModal = function() {
		$scope.modal.show();
	};
	$scope.closeModal = function() {
		$scope.modal.hide();
	};
	//Cleanup the modal when we're done with it!
	$scope.$on('$destroy', function() {
		$scope.modal.remove();
	});
	// Execute action on hide modal
	$scope.$on('modal.hidden', function() {
		// Execute action
	});
	// Execute action on remove modal
	$scope.$on('modal.removed', function() {
		// Execute action
	});

//home.html

Other Code...

<script id="Testing-modal.html" type="text/ng-template">
<ion-modal-view>
        <ion-header-bar class="bar bar-header bar-positive">
    	<h1 class="title">Title</h1>
    	<button class="button button-clear button-primary" ng-click="modal.hide()">Cancel</button>
        </ion-header-bar>
        <ion-content>
            <ion-list>
		<ion-item>
		    {{Title}}
	    	</ion-item>
            </ion-list>
	</ion-content>
    </ion-modal-view>
</script>

#2

Nevermind. Looks like it was fixed after I upgraded to Beta13. :smile: