Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile web browser back button not working properly #12524

Closed
harikishore9 opened this issue Jul 31, 2017 · 4 comments
Closed

Mobile web browser back button not working properly #12524

harikishore9 opened this issue Jul 31, 2017 · 4 comments

Comments

@harikishore9
Copy link

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.6.0

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
The issue is with browser back button. While navigating from sub pages using browser back button we are getting the following error. Have toggled the attribute [tabsHideOnSubPages] on all the tabs in the tabs page. However the issue still persists.

core.es5.js:1084 ERROR TypeError: Cannot read property 'match' of undefined
at Tabs._getSelectedTabIndex (tabs.js:604)
at DeepLinker._loadViewForSegment (deep-linker.js:420)
at deep-linker.js:110
at Array.forEach ()
at DeepLinker._urlChange (deep-linker.js:109)
at Object.next (deep-linker.js:40)
at SafeSubscriber.schedulerFn [as _next] (core.es5.js:3851)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:238)
at SafeSubscriber.next (Subscriber.js:185)
at Subscriber._next (Subscriber.js:125)

Expected behavior:
The navigation should work with both app (Ionic Header back button) and browser back button without any errors.

Steps to reproduce:
This issue is reproducible consistently.

  1. Go to any sample Ionic 3 app.
  2. Click on any of the tabs and go to Button without type has default border color #2 or List icon should just be a carrot icon by default, not an arrow #3 sub pages
  3. Use browser back button (instead Ionic Header back button) to come back to the previous page.

Ionic error page will be displayed with error in the console as well.

Related code:

<ion-tabs>
  <ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home" [tabsHideOnSubPages]="false"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="About" tabIcon="information-circle" [tabsHideOnSubPages]="false"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"  [tabsHideOnSubPages]="false"></ion-tab>
</ion-tabs>

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here
@jgw96
Copy link
Contributor

jgw96 commented Jul 31, 2017

Hello, thanks for opening an issue with us, we will look into this.

@kensodemann
Copy link
Member

Hello! Thank you for opening an issue with us!

I believe this issue was fixed by #12641, which was included in ionic-angular 3.6.1. Can you please verify that is the case? I will reopen this issue if it is not fixed in 3.6.1.

Thank you for using Ionic

@bashdosage
Copy link

It doesn't seem this issue has been fixed at all. I'm running into it very consistently. I'm using Ionic 3.19.1. It seems the navigation stack is getting screwed somewhere along the way and then it things the active is something different that the view I'm trying to bring up.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants