ionic-team / ionic-team/ionic-framework

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

Đang mở
#27,337 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
package: vue type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the linked reproduction URL and reproduce the sequence from Page 1 through Page 3, back to Page 2, then tap the active tab twice. Trace the Ionic Vue tab and back-button navigation entry points involved in that sequence. Done means the active tab returns to its tab page after the back navigation and repeated tapping does not navigate to the wrong page or crash.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
frontend, mobile-dev
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.