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.

RC.0 - ion-back-button with child in tabs starter goes to wrong tab

See original GitHub issue

Bug Report

Ionic version:

[x] 4.x

Current behavior:

Using ion-back-button from a tab other than first tab takes you to first tab, not tab that launched the child.

Expected behavior:

The ion-back-button should take you back to the tab from whence you came.

Steps to reproduce:

  1. use tab starter
  2. add a child page with default ion-back-button config in toolbar
  3. go to child from tab two or three
  4. hit back button
  5. end up on tab one…

Related code:

https://github.com/kensodemann/issue-tabs-back-button-

  1. clone
  2. npm start
  3. go to tab 2
  4. hit the “have a baby” button
  5. child open
  6. hit back button on child
  7. you are now on tab one instead of two

Ionic info:

~/Projects/Issues/issue-tabs-back-button (master): ionic info

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (/usr/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.0
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

System:

   NodeJS : v10.14.2 (/home/kensodemann/.nvm/versions/node/v10.14.2/bin/node)
   npm    : 6.4.1
   OS     : Linux 4.15

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
supperdsjcommented, Jan 4, 2019

<ion-back-button (click)="navCtrl.goBack()"></ion-back-button> NavController.goBack() can go back to the right page.

0reactions
kensodemanncommented, Jan 15, 2019

You are correct sir!! (locking this as well to avoid further discussion here)

Read more comments on GitHub >

github_iconTop Results From Across the Web

RC.0 - ion-back-button with child in tabs starter goes to wrong ...
Steps to reproduce: use tab starter; add a child page with default ion-back-button config in toolbar; go to child from tab two or...
Read more >
Ionic 4 ion-tabs navigation problem: When back button is ...
I press back button and it goes back to chat tab (should go back to home page instead). However, it works fine on...
Read more >
Back button not showing when coming from nested pages (tabs)
I have a page (app.other), which can be accessed from other views. When I go from app.home to app.other, the back arrow is...
Read more >
ion-back-button-tabs - npm
This means that it's first checked with the help of the tabsPrefix if to navigate back to a tabbed-page. If this is the...
Read more >
@ionic/core | Yarn - Package Manager
ionic-team1.1mMIT6.4.0TS vulns 0 vulnerabilities. Base components for Ionic. ionic, framework, stencil, mobile. readme. Ionic. Ionic is an open source app ...
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