Skip to content

bug: vue, react using browser back button in tabs does not display correct url #25141

@TadasMil

Description

@TadasMil

Prerequisites

Ionic Framework Version

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

Current Behavior

On navigating to Tab 1 page nested route and selected Tab 2 page, then go back to Tab 1 page and clicking back on the browser back button the displayed route is Tab 1 (The url is for Tab 2, but the route displayed is Tab 1).

Expected Behavior

On navigating to Tab 1 page nested route and selected Tab 2 page, then go back to Tab 1 page and clicking back on the browser back button the displayed route is Tab 2 (The url is for Tab 2, and the route displayed is Tab 2).

Steps to Reproduce

  1. Run the application.
  2. Click on Navigate to nested page text which can be found inside the Tab 1 page as a text.
  3. You are redirected to Tabs 1 nested page.
  4. Click on Tab 2.
  5. Click on Tab 1 (The nested child route is displayed).
  6. Click browser back button.
  7. The displayed page is Tab 1 (Root route), but the URL is for Tab 2.

Code Reproduction URL

https://github.com/TadasMil/ionic-bug-vue-router

Ionic Info

Ionic:

Ionic Framework :
"@ionic/vue": "^6.0.0",
"@ionic/vue-router": "^6.0.0",

Capacitor:
"@capacitor/app": "1.1.1",
"@capacitor/core": "3.4.3",
"@capacitor/haptics": "1.1.4",
"@capacitor/keyboard": "1.2.2",
"@capacitor/status-bar": "1.0.8",

Additional Information

The actual documentation for nested child routes can be found here: https://ionicframework.com/docs/vue/navigation#child-routes-within-tabs. The actual code that's in github repo is the same as in the documentation.

I'm attaching a video example.

Ionic.App.Mozilla.Firefox.2022-04-17.19-33-18.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions