ionic-team / ionic-team/ionic-framework

bug: vue, back button shows wrong view after tapping tab button to navigate to root of tab

Ouverte
#27,337 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
package: vue type: bug
Langage dominant
TypeScript
Étoiles
52.7k
Forks
13.3k
Merge moyen
1 j 15 h
PR mergées (30 j)
51

Description

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v6.x
v7.x

### Current Behavior

After using the ion-back-button to navigate back once, tapping the active tab to navigate back to the tab page seems to cause the tab to adopt the same behavior as ion-back-button but breaks navigation.

### Expected Behavior

When clicking the active tab button, navigate back to the tab page of that tab's nav stack.

### Steps to Reproduce

1. Have tab 1 active
2. Click button on each page to navigate as so: Page1 -> Page2 -> Page 3
3. On Page 3, click back button to navigate back to Page 2.
4. On Page 2, click the active tab button at the bottom of the screen. It will navigate to Page 1 instead of the Tab1 Page.
5. Click active tab button again and the app will crash.

### Code Reproduction URL

https://github.com/twestbrook09/ionic-vue-nav-bug

### Ionic Info

Ionic:

Ionic CLI : 7.0.1 (/home/twest/.nvm/versions/node/v18.16.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 7.0.4

Capacitor:

Capacitor CLI : 4.8.0
@capacitor/android : not installed
@capacitor/core : 4.8.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 1.7.2

System:

NodeJS : v18.16.0
npm : 9.5.1
OS : Linux 5.15

### Additional Information

If ion-back-button is not used, the tab button works as intended. If there's only 2 pages on the navigation stack, it works as intended since the tab button only has one other page to possibly navigate back to which is its intended page.

Hopefully this makes sense.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.