Skip to content

bug: vue, memoryRouter + tapping tab while inside nested route does nothing #29785

Closed

Description

@ryaposov

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When using memory history router and tapping on ion-tab while being on a nested route, nothing happens.
While debugging I found that route.position is undefined when trying to reset to root page. That maybe expected, not sure.

When using web history router, navigation to root page works as expected. I have to use memory router to make swipe back working inside PWA.

image

Expected Behavior

Navigate back to the root page of the tab.

Steps to Reproduce

  1. Clone (ionic-vue-conference-app)[https://github.com/ionic-team/ionic-vue-conference-app]
  2. Use memory router in router.ts (createMemoryHistory)
  3. Click on any session on sessions tab
  4. Click on schedule tab in the tab bar
  5. Nothing happens

Code Reproduction URL

https://github.com/ionic-team/ionic-vue-conference-app

Ionic Info

[ERROR] Invalid project type: vue-vite (project config: ./ionic.config.json).
        
        Project type must be one of: angular, ionic-angular, ionic1, custom, react, vue

Bad project type: undefined

Additional Information

No response

Activity

  1. thetaPC commented on Sep 10, 2026

    @thetaPC
    Contributor

    Thank you for submitting the issue!

    Verified. Reproduces on every supported version: 8.7.5 and 9.0.3.

    Your debugging was right, and route.position being undefined is the whole bug rather than a side detail. createMemoryHistory keeps its cursor in a private variable and never publishes it in history.state, which is the one place Ionic's router reads it from. When you tap the tab you are already on, Ionic works out how many entries to go back by subtracting the tab root's position from the current one. With memory history both are undefined, so the offset is NaN and router.go(NaN) moves nowhere. Web and hash history both publish a numeric position, which is why they work.

    Only tapping the active tab is affected. Switching to a different tab from a child page takes a different code path and works fine under memory history.

    Tracked internally for a fix in @ionic/vue-router. Thanks for the clear report and for doing the debugging.

  2. added
    package: vue
    type: bug
    and removed on Sep 10, 2026
  3. added a commit that references this issue on Oct 1, 2026
    edbc304
  4. ShaneK commented on Oct 7, 2026

    @ShaneK
    Member

    Hey! Thanks for the bug report! This has been fixed in v9.0.7!

  5. self-assigned this
    on Oct 7, 2026
  6. ionitron-bot commented on Nov 6, 2026

    @ionitron-bot

    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.

  7. locked and limited conversation to collaborators on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

package: vuetype: bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions