Strange Back button + modal

Hello,

These days i’ve been working on the hardware back button behaviour in my app, and i’ve found something strange in one specific situation.

According to these forums, I’ve seen that the priorities to the back button events are the following:

// PLATFORM_BACK_BUTTON_PRIORITY_VIEW = 100;
// PLATFORM_BACK_BUTTON_PRIORITY_SIDE_MENU = 150;
// PLATFORM_BACK_BUTTON_PRIORITY_ACTION_SHEET = 300;
// PLATFORM_BACK_BUTTON_PRIORITY_POPUP = 400;
// PLATFORM_BACK_BUTTON_PRIORITY_LOADING = 500;

I’ve also read that when the app can’t go back in history, the app is closed.
That is usually working right, but i’ve noticed that if I also initialize a modal in my controller using the following code, the event 100 is fired when the app can go backwards in history, but never exits the app. Also, the console doesn’t say anything.

$ionicModal.fromTemplateUrl('modal.html', function(modal) {
	$scope.modal = modal;
}, {
	animation: 'no-animation',
	focusFirstInput: true
});

Removing the modal solves the issue, but I found that this might be worth commenting.

1 Like

Hmm, interesting. Why don’t you open an issue for this. Seems like a rare case, but it might be worth looking at and fixing.

I’d love do that, but i’ve never opened an issue. Do I just need to go to github and open an issue there explaining the situation? I guess i can give it a try.

You can always use this

http://ionicframework.com/submit-issue/

hey…any news of this problem…!i m facing same…problem…!Any solution…??