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: react, vue back button does not select correct view when going back from a tabs instance

See original GitHub issue

Bug Report

Ionic version:

[ ] 4.x [x] 5.6.3 (Latest)

Current behavior: I have an ionic-vue app that uses vue-router and the tabs template. When I navigate to a nest tabs, and switch to tab2 and switch back to tab1. When I click on ion-back-button it show error Cannot read property ‘ionPageElement’ of undefined

Expected behavior: I would expect that switch back to parent tabs

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)

  • Make a ionic-vue app using the tabs template
  • Create tabs2 (/tabs2/test) and add ion-back-button
  • Navigate to tabs2/test/tab1
  • Switch to tab2
  • Switch back to tab1
  • Click ion-back-button
  • It show error Cannot read property ‘ionPageElement’ of undefined

GIF Image ( Steps to reproduce )

Related code: https://codesandbox.io/s/magical-snow-w7xok

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 6.13.1
   Ionic Framework : @ionic/vue 5.6.3

Capacitor:

   Capacitor CLI   : 2.4.7
   @capacitor/core : 2.4.7

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

System:

   NodeJS : v14.15.5
   npm    : 6.14.11
   OS     : macOS Big Sur

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
horganicecommented, Apr 6, 2021

@liamdebeasi Just did a dev build on my project. all is working fine now 😃 Thank you !

1reaction
liamdebeasicommented, Apr 2, 2021

Thanks for the issue. Can you try the following dev build and let me know if it resolves the issue?

npm install @ionic/vue@5.7.0-dev.202104021913.b0533ff @ionic/vue-router@5.7.0-dev.202104021913.b0533ff
Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: react, vue back button does not select correct view when ...
Current behavior: I have an ionic-vue app that uses vue-router and the tabs template. When I navigate to a nest tabs, and switch...
Read more >
Back button on the browser not taking to the right tab in vue
But when I click on back button on the browser to go back to the previous page which is the users tab page...
Read more >
ion-modal: Ionic Mobile App Custom Modal API Component
ion-modal is a dialog that appears on top of mobile app content, and must be dismissed before interaction resumes. Learn more about custom...
Read more >
Framework7 Release Notes
Now it falls back to not "routable" modal when there is no View passed or it can't be found. Smart Select. Now it...
Read more >
Test Renderer - React
This package provides a React renderer that can be used to render React ... does not return true for exactly one test instance,...
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