bug: IonNav is creating a new RootPage after modal dismiss
See original GitHub issueBug Report
Ionic version:
[ ] 4.x [x] 5.x
Current behavior:
I am using navigation inside a modal with IonNav. When I dismiss the modal, the IonNav is creating a new rootPage component.
Expected behavior:
When the modal is dismissed, IonNav should not create new component.
Steps to reproduce:
Using Ionic/Vue, create a IonNav inside a modal. You have to make a navigation action inside the modal (push) for the problem to appear.
If no navigation is made (modal dismiss without navigation), the case does not happen.
Related code:
Using the “Ionic/Vue Nav in modals” sample project from aaronksaunders, with some additional log statements https://github.com/florian72810/ionic-vue-nav-in-modals
BaseModal: created
ModalHome.vue?7215:80 ModalHome: created
ModalHomeDetail.vue?4bd5:53 ModalHomeDetail: created
ModalHome.vue?7215:68 ModalHome: modal is dismissing
ModalHome.vue?7215:80 ModalHome: created
ModalHome.vue?7215:70 ModalHome: modal dismissed
With the simple project, the problem is not blocking. But on my real project, the modal is dismissed while still rendering. This ends with an error “Cannot read property ‘__composer’ of undefined” from “vue-i18n”, and the router does not respond.
Other information:
Ionic info:
Ionic:
Ionic CLI : 6.12.3 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 5.5.4
Capacitor:
Capacitor CLI : 2.4.6
@capacitor/core : 2.4.6
Utility:
cordova-res : not installed
native-run : 1.3.0
System:
NodeJS : v14.15.4 (/Users/foxer/.nvm/versions/node/v14.15.4/bin/node)
npm : 6.14.10
OS : macOS Big Sur
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
It works with the dev build 👍
Thanks! Sorry I must have misread your original post. Can you try the following dev build and let me know if it resolves the issue?