Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.0-rc.0] Android back button can unexpectedly switch tabs #16875

Closed
qiluo opened this issue Dec 24, 2018 · 4 comments
Closed

[4.0.0-rc.0] Android back button can unexpectedly switch tabs #16875

qiluo opened this issue Dec 24, 2018 · 4 comments

Comments

@qiluo
Copy link

qiluo commented Dec 24, 2018

Bug Report

Ionic version:

[x] 4.x

Current behavior:

When you tap on Android back button, it can unexpectedly switch tabs

Expected behavior:

On the tabs layout, Android back button should do nothing, since tabs layout is root component already

Steps to reproduce:

  1. create a new project from tabs starter
  2. add platform android
  3. run app on Android device
  4. randomly tap on any tab to generate a navigation history
  5. keep tapping on Android back button, the app just went way back of all its navigation history

Related code:

insert short code snippets here

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.0
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/Dev/Android/android-sdk-macosx)
   ios-deploy        : 1.9.4
   ios-sim           : 6.1.2
   NodeJS            : v10.14.2 (/usr/local/bin/node)
   npm               : 6.4.1
   OS                : macOS Sierra
   Xcode             : Xcode 9.2 Build version 9C40b
@ionitron-bot ionitron-bot bot added the triage label Dec 24, 2018
@qiluo qiluo changed the title Android back button can unexpectedly switch tabs [4.0.0-rc.0] Android back button can unexpectedly switch tabs Dec 24, 2018
@amitairos
Copy link

I would suggest differentiating between top tabs to bottom tabs. Top tabs should not respond to back button, while bottom tabs should maybe navigate to the home button.

@qiluo
Copy link
Author

qiluo commented Dec 25, 2018

I would suggest differentiating between top tabs to bottom tabs. Top tabs should not respond to back button, while bottom tabs should maybe navigate to the home button.

In my case, it's bottom tabs. But if you look at native apps, they don't really switch either top or bottom tabs by Android back button in most cases

@paulstelzer
Copy link
Contributor

This is something for #16611

@ionitron-bot
Copy link

ionitron-bot bot commented Jan 2, 2020

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

@ionitron-bot ionitron-bot bot closed this as completed Jan 2, 2020
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants