ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

android hardware back button closes app despite visible back button

Open lbickston opened this issue 10 years ago • 1 comments

Short description of the problem:

I have a normal tabs app. I call this.nav.rootNav.push() to navigate to a page outside the tab view. The new page shows the back button, like I would expect it to. If I press the hardware back button, the app closes instead of returning to the tab view.

Note: If I pressed the back button in the navbar, it would have returned to the tab view like normal.

What behavior are you expecting?

I would expect the hardware back button to go back.

Steps to reproduce:

  1. Create app with tabs
  2. Create new page
  3. Navigate to new page from tab using this.nav.rootNav.push(NewPage)
  4. Press the android hardware back button and app closes

Which Ionic Version? 2.x

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.1.1 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.7 Ionic CLI Version: 2.0.0-beta.29 Ionic App Lib Version: 2.0.0-beta.16 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v5.5.0 Xcode version: Xcode 7.3 Build version 7D175

lbickston avatar Jun 03 '16 21:06 lbickston

This should be fixed as of this commit: https://github.com/driftyco/ionic/commit/9f293e85496404364c08a8275c04f52d19dacea6

Thanks for creating this issue and pointing out the problem.

adamdbradley avatar Jun 08 '16 15:06 adamdbradley