-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: router.go() not working as expected in ionic vue app #28201
Comments
Thanks for the issue! This issue has been labeled as Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue. For a guide on how to create a good reproduction, see our Contributing Guide. |
Reproduction added. Please find the example codebase and the issue recording. |
Did you push the complete code? I see |
Sorry just noticed that and updated it. |
Thank you for reporting the issue. I can confirm that the |
Has there been any update on this one @thetaPC? We're also running into this problem. It causes navigation to be quite unreliable in some situations and doesn't give us confidence in the ability to navigate backwards in the history stack. |
Thank you for reaching out. I wanted to let you know that the issue is still in our backlog. At the moment, we don’t have a specific timeline for when it will be addressed. However, rest assured that it's on our radar, and we will update this issue as soon as we have more information. |
resolves #28201 This PR fixes the navigation issue related to `router.go` that was identified in issue #28201. After working on this issue I realised that @xxllxhdj has already created a PR for this in #29847. While their fix is great, I have added tests to replicate the issue, reused existing code and `undefined` will be returned in unexpected situations - which matches the existing functionality. ## What is the current behavior? If a user navigates from `/home` -> `/pageA` -> `/pageB` -> `/pageC` -> back to `/pageB` -> then `router.go(-2)` is called the URL will be updated to `/home` correctly, but the app will try to render `/pageA`. This happens for any delta < -1. ## What is the new behavior? The app will correctly render `/pageA`, which matches the URL. ## Does this introduce a breaking change? - [ ] Yes - [X] No --------- Co-authored-by: xxllxhdj <[email protected]>
Thanks for the issue! This has been resolved via PR #29877 and will be available in an upcoming release of Ionic. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Actual behaviour: app view is in Page2 but url is Page1's.
Expected Behavior
Expected to be in Page1 for both url and view.
Steps to Reproduce
4f603fb4-1c47-478f-9229-391b3fcef05c.webm
Code Reproduction URL
https://github.com/TaraWei-twobulls/Ionic-vue-app-router-issue-reproduction/tree/main
Ionic Info
Ionic:
Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 7.1.2
Capacitor:
Capacitor CLI : 5.1.1
@capacitor/android : 5.1.1
@capacitor/core : 5.1.1
@capacitor/ios : 5.1.1
Additional Information
Seems ionic outlet view does not know where the current view is, and it always go back from the last view in stack though user has been back to the previous view
The text was updated successfully, but these errors were encountered: