ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: router.go() not working as expected in ionic vue app

Open TaraWei-twobulls opened this issue 8 months ago • 5 comments

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

  1. Home page > Page 1 > Page2 > Page3 using ionRouter.push()
  2. Page3 > Page2 using ionRouter.back()
  3. Trigger history.go(-2) or router.go(-2) in Page2 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

TaraWei-twobulls avatar Sep 20 '23 06:09 TaraWei-twobulls

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

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.

ionitron-bot[bot] avatar Sep 20 '23 13:09 ionitron-bot[bot]

Reproduction added. Please find the example codebase and the issue recording.

TaraWei-twobulls avatar Sep 22 '23 03:09 TaraWei-twobulls

Did you push the complete code? I see myApp is added as a submodule, but there's no information in there so I can't initialize it.

liamdebeasi avatar Sep 22 '23 17:09 liamdebeasi

Sorry just noticed that and updated it. Please run npm i and ionice serve to run locally.

TaraWei-twobulls avatar Sep 26 '23 02:09 TaraWei-twobulls

Thank you for reporting the issue. I can confirm that the router.go() is not navigating to the correct view. This issue has been categorized as a bug to prioritize in our backlog.

thetaPC avatar Nov 17 '23 19:11 thetaPC