ionic-team / ionic-team/ionic-framework

bug: vue, memoryRouter + tapping tab while inside nested route does nothing

Ouverte
#29,785 1 commentaire 1 réaction 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/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 memory history router and tapping on ion-tab while being on a nested route, nothing happens.
While debugging I found that `route.position` is `undefined` when trying to reset to root page. That maybe expected, not sure.

When using web history router, navigation to root page works as expected. I have to use memory router to make swipe back working inside PWA.

image

### Expected Behavior

Navigate back to the root page of the tab.

### Steps to Reproduce

1. Clone (ionic-vue-conference-app)[https://github.com/ionic-team/ionic-vue-conference-app]
2. Use memory router in router.ts (`createMemoryHistory`)
3. Click on any session on sessions tab
4. Click on schedule tab in the tab bar
5. Nothing happens

### Code Reproduction URL

https://github.com/ionic-team/ionic-vue-conference-app

### Ionic Info

```
[ERROR] Invalid project type: vue-vite (project config: ./ionic.config.json).

Project type must be one of: angular, ionic-angular, ionic1, custom, react, vue

Bad project type: undefined
```

### Additional Information

_No response_

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduce the issue in the ionic-vue-conference-app using createMemoryHistory in router.ts: open a session from the sessions tab, then tap the schedule tab. Inspect the tab navigation and root-page reset path where route.position is read. Done means tapping another tab from a nested route navigates back to that tab’s root page.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

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