ionic-team / ionic-team/ionic-framework
bug: navigation breaks when replacing nested tab view
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 51
描述
### Prerequisites
- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/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
v8.x
### Current Behavior
When using nested routes and tabs there is a situation where navigation breaks when you replace a nested tab view with a sibling (and switching tabs between). When this happens the back button in the view doesn't work and you can't switch to the previous tab.
### Expected Behavior
- The back button should go to the Tab 1 view
- Clicking on the Tab 2 tab should show the Tab 2 view
### Steps to Reproduce
Steps to replicate bug:
1. Go to: https://stackblitz.com/~/github.com/bentleyo/ionic-tabs-vue?file=src/views/Tab1Page.vue
2. Open Tab 1 - Inner View 1
3. Switch to Tab 2
4. Switch back to Tab 1 (should still be on Inner View 1)
5. Replace with Tab 1 - Inner View 2
6. Try pressing the back button or switching to Tab 2, neither work
### Code Reproduction URL
https://stackblitz.com/~/github.com/bentleyo/ionic-tabs-vue?file=src/views/Tab1Page.vue
### Ionic Info
I am inside the ionic project directory, but it's playing up for me.
I can replicate using:
```
@ionic/core@8.7.2
@ionic/vue-router@8.7.2
@ionic/vue@8.7.2
```
> [WARN] You are not in an Ionic project directory. Project context may be missing.
>
> Ionic:
>
> Ionic CLI : 5.4.16
>
> Utility:
>
> cordova-res : not installed
> native-run : 2.0.1
>
> System:
>
> NodeJS : v18.16.0
> npm : 9.5.1
> OS : macOS Unknown
### Additional Information
_No response_
贡献指南
调研方向
Start with the linked StackBlitz reproduction and inspect src/views/Tab1Page.vue, following the nested tab and route replacement sequence. Reproduce the failure with the listed Ionic 8.7.2 packages, then trace the navigation behavior around switching tabs and replacing the nested view. Done means the back button returns to Tab 1 Inner View 1 and switching to Tab 2 shows Tab 2 correctly.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100