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
When using the vue-router's replace method to a child route of the TabsComponent but not on the tab itself, the previous tab stays with the 'tab-selected' class on it.
Expected behavior:
When routing to the next page, the tab button should lose the 'tab-selected' class.
Steps to reproduce:
Instructions in the readme of the repo below, but pull, run ionic serve click the 'Goto tab 3' button. Note how the tab one route stays activated.
Alternatively run ionic start --type=vue and choose tabs. Goto the Tabs view and remove Tab3 from the element. Goto the Tab 1 view and add a button to use router.replace to go to tab3. Note how the tab 1 keeps the tab-selected class on it.
mattmilan-dev
changed the title
bug: Ionic Tabs tab-selected class incorrectly staying after transitioning to different tab not in list.
bug: (Vue) Ionic Tabs tab-selected class incorrectly staying after transitioning to different tab not in list.
Nov 28, 2020
I plan on taking a look at this after the holidays, but as a temporary workaround, you can add the required ion-tab-button but just hide it with the .ion-hide utility class:
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.
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
When using the vue-router's
replace
method to a child route of the TabsComponent but not on the tab itself, the previous tab stays with the 'tab-selected' class on it.Expected behavior:
When routing to the next page, the tab button should lose the 'tab-selected' class.
Steps to reproduce:
Instructions in the readme of the repo below, but pull, run
ionic serve
click the 'Goto tab 3' button. Note how the tab one route stays activated.Alternatively run
ionic start --type=vue
and choose tabs. Goto the Tabs view and remove Tab3 from the element. Goto the Tab 1 view and add a button to userouter.replace
to go to tab3. Note how the tab 1 keeps thetab-selected
class on it.Related code:
https://github.com/mattmilan-dev/Ionic-Vue-Incorrect-Activated-Route-State/tree/master
Other information:
Ionic info:
Thanks in advance Liam ;)
The text was updated successfully, but these errors were encountered: