question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: bug in ionic-vue routing when using ion-back-button

See original GitHub issue

Bug Report

Ionic version: [ ] 4.x [x] 5.6.0

Current behavior: I have an ionic-vue app that uses vue-router and the tabs template. When I navigate to a subroute, from the subroute changing to another tab, then go back to the tab which has the subroute still active and then pressing the back button in this subroute causes my route to change to the other tab (in the URL), but the animation still does go to the main tab of the sub route.

Expected behavior: I would expect that - besides switching back to the parent view - my url would also return to the parent tab

Steps to reproduce:

  • Make a ionic-vue app using the tabs template
  • Add a sub route to one of the tabs (i.e. tab1) (make sure this view has the ion-back-button active in the ion-toolbar)
  • Enter the sub route (of tab1)
  • Switch to another tab (i.e. tab2) from this sub route
  • Switch back to the tab that has the sub route active (i.e. tab1)
  • Press the back button in this sub route
  • The back button causes the view to return to the parent view of this tab (tab1 in this case, which I would expect) but the url switches back to the other tab (tab2)

Related code:

working codesandbox

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 6.13.1 (C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework : @ionic/vue 5.6.0

Capacitor:

   Capacitor CLI   : 2.4.6
   @capacitor/core : 2.4.6

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.9.0
   OS     : Windows 10

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Apr 6, 2021

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/23154, and a fix will be available in an upcoming release of Ionic Framework.

1reaction
scryptokingcommented, Apr 3, 2021

@liamdebeasi Just did a dev build on my current project. all is working fine now. Fix did the job 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug in ionic-vue routing when using ion-back-button #23087
Bug Report Ionic version: [ ] 4.x [x] 5.6.0 Current behavior: I have an ionic-vue app that uses vue-router and the tabs template....
Read more >
Bug with IonBackButton and Tabs. Back button doesn't work ...
Navigation using IonBackButton doesn't work correctly when there are several Tabs and internal pages inside each Tab. How to repeat bug:.
Read more >
ionic/vue and the backbutton : r/ionic - Reddit
I am writing because I ran into what may be a bug with the framework ... the method is literally just a $router.push...
Read more >
ionic vue ion-back-button is not working as expectation
What are you routing with? In case you got an SPA thats misconfigured, it's likely that there is no "back" at all -...
Read more >
@modus/ionic-vue - npm
Ionic integration adapters for Vue. Latest version: 1.3.12, last published: 2 years ago. Start using @modus/ionic-vue in your project by running `npm i ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found