Skip to content
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: navigating between root routes and tab child routes the view is not being updated #25792

Closed
4 of 7 tasks
TadasMil opened this issue Aug 20, 2022 · 3 comments
Closed
4 of 7 tasks
Labels

Comments

@TadasMil
Copy link

TadasMil commented Aug 20, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

While redirecting to a page that does not belong as one of tabs child routes, the actual view is not being updated, but the URL is.

Steps to reproduce regarding my provided example:

  1. Click go to another page which invokes the redirectToAnotherPage function and redirects to the view that is out of scope of tabs tree.
  2. Once your in a second page, refresh the page.
  3. Click back (browser or hardware) button.
  4. Now we're in Tab 1. Lets click go to another page button again.
  5. The view is not updated and displayed view is still Tab 1. The actual URL gets updated.

Expected Behavior

Steps to reproduce regarding my provided example:

  1. Click go to another page which invokes the redirectToAnotherPage function and redirects to the view that is out of scope of tabs tree.
  2. Once your in a second page, refresh the page.
  3. Click back (browser or hardware) button.
  4. Now we're in Tab 1. Lets click go to another page button again.
  5. The view is updated and displayed view is still Another Page.

Steps to Reproduce

I was concerned if this is the way router should work or it's an actual bug.

If it's the way it should work, is there any other way to have view out of tabs scope (without need to v-if on bottom navigation bar)?

Code Reproduction URL

https://github.com/TadasMil/ionic-router-not-working

Ionic Info

Ionic:

Ionic CLI : 6.19.0 (C:\Users\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/vue 6.1.9

Capacitor:

Capacitor CLI : 3.5.1
@capacitor/android : 3.5.1
@capacitor/core : 3.5.1
@capacitor/ios : 3.5.1

Utility:

cordova-res : 0.15.4
native-run : 1.6.0

System:

NodeJS : v18.0.0 (C:\Program Files\nodejs\node.exe)
npm : 8.6.0
OS : Windows 10

Im attaching video in the comments, as somehow Im not able to do it here.

@ionitron-bot ionitron-bot bot added the triage label Aug 20, 2022
@TadasMil
Copy link
Author

file.mp4

@liamdebeasi liamdebeasi self-assigned this Aug 23, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I can reproduce this behavior. However, this bug appears to be caused by the same underlying code as your other issue: #25141. I am going to merge the two issues together.

Refreshing the page on /another-page/123 wipes the in-memory history that Ionic needs for routing to work correctly. The previous /tabs/tab1 page is in a separate app session, yet it is treated as being in the same application session. As a result, it is possible that the app is expecting a different element to be mounted or that the in-memory history is being manipulated incorrectly. Please follow the linked issue for updates. Thanks!

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2022
@liamdebeasi liamdebeasi removed their assignment Aug 23, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 22, 2022

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants