Skip to content

bug: Initial tab not selected when using memory router #30611

@aeharding

Description

@aeharding

Prerequisites

Ionic Framework Version

v7.x, v8.x

Current Behavior

This issue stems from #30552. That was solved for location-based routing, but unfortunately the problem still exists when using Ionic's memory router.

Example: https://stackblitz.com/edit/lcx3ywfg-vadxa3sf?file=src%2Fmain.tsx

(Voyager for Lemmy uses the memory router for native and PWA to prevent certain other bugs, so unfortunately can't switch to normal location based router.)

Expected Behavior

Initial tab should be selected

Steps to Reproduce

Open repro. Observe "Listen Now" is not selected.

Code Reproduction URL

https://stackblitz.com/edit/lcx3ywfg-vadxa3sf?file=src%2Fmain.tsx

Ionic Info

N/A

Additional Information

I think the problem is the fix uses the browser pathname for routing:

a2e803a#diff-c81e7421844580393760b9b88460d44537261b56061b496988ff6d39647018bbR79

However, Ionic should use the internal router pathname instead to support memory router

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions