ionic-team / ionic-team/ionic-framework
bug: angular, ion-back-button not going back to correct tab after leaving main tabs context
- Vorherrschende Sprache
- TypeScript
- Sterne
- 52.7k
- Forks
- 13.3k
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 51
Beschreibung
# Bug Report
**Ionic version:**
[x] **4.x**
**Current behavior:**
When you navigate from a tab page to another tab page and then go back with the ion-back-button, you will always end up at tab index 0 of the first tab page.
**Expected behavior:**
Instead, the app should go back to the tab where the user came from.
**Steps to reproduce:**
To illustrate the problem, I have taken the sample starter tab app of Ionic and extended it with a second tab page. This is the setup:
First tab page (TabsPage):
* /tabs/tab1/
* /tabs/tab2/
* /tabs/tab3/
Second tab page (OtherTabsPage):
* /other-tabs/other-tab1/
Reproduce the problem like this:
* Open tab2
* Click the button ("open nested tab") to go to the new tab page (other-tab1)
* Now click the back button on the top left, you will end up on tab1 instead of tab2
**Related code:**
You can easily try it out here:
https://stackblitz.com/edit/ionic-v4-angular-tabs-hxxnpm
**Ionic info:**
```
Ionic:
Ionic CLI : 5.4.4 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.11.2
@angular-devkit/build-angular : 0.803.15
@angular-devkit/schematics : 8.3.15
@angular/cli : 8.3.15
@ionic/angular-toolkit : 2.1.1
Capacitor:
Capacitor CLI : 1.3.0
@capacitor/core : 1.3.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
Utility:
cordova-res : not installed
native-run : 0.2.8 (update available: 0.2.9)
System:
ios-deploy : 1.9.2
ios-sim : 8.0.1
NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.12.1
OS : macOS Mojave
Xcode : Xcode 11.0 Build version 11A420a
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.