You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tabs
Song Index
Playlist Index
Playlist Viewer
Song viewer
Settings
The playlists page has a list of playlists which can be viewed using the shared-route view. This view has a list of songs that can be pushed to. The song-viewing view is external to the tabs.
Page lifecycle events
The app starts on the index page. Navigating to the playlists page, a playlist, a song, and back (any method) does not trigger the playlist-viewing page's view entering event. Index -> Playlists -> Playlist [nested] -> Song [external to tabs] -> (back) Playlist
The paths are:
/index
/playlists
/playlists/xxx
/song/yyy
/playlists/xxx
After leaving the nested view (going back to the root view of the playlist tab), it works fine. Switching to the other tab and back also fixes it.
Leaving the nested view and coming back -- before doing anything else -- prevents the issue.
Starting on the playlists tab does not manifest the issue; however, going to the index tab sets the stage for it.
A complex orchestration of history state.
A button that navigates to the settings page is present on all the pages. This exhibits the same behavior when using it from the nested view.
The behavior does not appear to manifest when navigating to and from the external views directly from the root tab views; only from the nested view in the playlist tab.
Also, view leaving events are never triggered when navigating to a view external to tabs.
Tab navigation state
Navigating to a nested view in a tab, switching tabs, navigating to an "external" view, and going back clears the state of the first tab.
In this case:
Go to playlist tab.
Go to playlist viewer (in playlist tab).
Switch to index tab.
Go to song viewer (external-to-tabs view).
Go back.
Switch to the playlists tab.
The playlist tab shows the playlist index instead of the playlist viewer.
Expected Behavior
I expect to be able to use pages external to the tab routes.
Specifically:
I expect page lifecycle events to always fire.
I expect tabs to maintain their individual navigation state.
Steps to Reproduce
Create a tabbed Vue application with the route structure like the one described above. Include logging of the page lifecycle events.
Load the app on the index page. Navigate to the playlists page, a playlist, a song, and back (any method). Index -> Playlists -> Playlist [nested] -> Song [external to tabs] -> (back) Playlist
The paths are:
Prerequisites
Ionic Framework Version
v6.x
Current Behavior
I am using Vue and Ionic 6.7.5.
Tabs do not work correctly when using pages outside tab routes.
This is the relevant route config:
The structure is:
The playlists page has a list of playlists which can be viewed using the shared-route view. This view has a list of songs that can be pushed to. The song-viewing view is external to the tabs.
Page lifecycle events
The app starts on the index page. Navigating to the playlists page, a playlist, a song, and back (any method) does not trigger the playlist-viewing page's view entering event.
Index -> Playlists -> Playlist [nested] -> Song [external to tabs] -> (back) PlaylistThe paths are:
/index/playlists/playlists/xxx/song/yyy/playlists/xxxAfter leaving the nested view (going back to the root view of the playlist tab), it works fine. Switching to the other tab and back also fixes it.
Leaving the nested view and coming back -- before doing anything else -- prevents the issue.
Starting on the playlists tab does not manifest the issue; however, going to the index tab sets the stage for it.
A complex orchestration of history state.
A button that navigates to the settings page is present on all the pages. This exhibits the same behavior when using it from the nested view.
The behavior does not appear to manifest when navigating to and from the external views directly from the root tab views; only from the nested view in the playlist tab.
Also, view leaving events are never triggered when navigating to a view external to tabs.
Tab navigation state
Navigating to a nested view in a tab, switching tabs, navigating to an "external" view, and going back clears the state of the first tab.
In this case:
The playlist tab shows the playlist index instead of the playlist viewer.
Expected Behavior
I expect to be able to use pages external to the tab routes.
Specifically:
Steps to Reproduce
Create a tabbed Vue application with the route structure like the one described above. Include logging of the page lifecycle events.
Load the app on the index page. Navigate to the playlists page, a playlist, a song, and back (any method).
Index -> Playlists -> Playlist [nested] -> Song [external to tabs] -> (back) PlaylistThe paths are:
/index/playlists/playlists/xxx/song/yyy/playlists/xxxCode Reproduction URL
darrylnoakes/ionic-27847
Ionic Info
Actually Windows 11.
Additional Information
Is this the correct behavior or a bug? Is it a known or unknown issue?
I do not know if this is an issue in Ionic 7.
Related issues:
Possibly related:
Video of reproducing the lifecycle events issue:
Repro.mp4