ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
127 stars 85 forks source link

ion-tab navigation bar out of sync with page display when using deeplinks on mobile device #27

Open ionitron-bot[bot] opened 6 years ago

ionitron-bot[bot] commented 6 years ago

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.x

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request

Current behavior: The tab navigation buttons do not correspond to the page being displayed when the app is opened through a deeplink. Opening the app through regular means (dashboard, xcode, terminal, etc) does not exhibit this behaviour and the tabs are working as expected.

But when using deeplinks to launch the app, if I open myapp://host/about or any other matched routes, the app will be opened to the foreground with the correct selected tab highlighted in the navigation bar(see screenshot below)

However as soon as I click on other tabs using the navigation bar, the highlighted navigation tab does not update to match the displaying tab page (see screenshot: Current selectedTab/displayed page = ContactPage. The navigation bar shows 'AboutPage' is selected instead)

When it does update, it seems the tab navigation is lagging behind 1 click (see screenshot: Current displayed page = HomePage. The navigation shows 'ContactPage' is selected instead)

After two clicks, the navigation tabs stop updating all together, and is stuck on whichever tab that it last updated to.

Expected behavior: The navigation tab bar should highlight the selected tab aka the displayed page.

Steps to reproduce:

  1. Clone bug demo repo here.
  2. npm install
  3. ionic build ios/android --debug (I'm using ionic CLI v. 2.2.3. Use corresponding CLI build command if using a different version of ionic CLI)
  4. Open link: myapp://example.com/about and launch demo app.
  5. Click on navigation buttons to push a different tab to view.

Related code:

Ionic info::

Cordova CLI: 6.5.0
Ionic Framework Version: 3.4.2
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.10.2
Xcode version: Xcode 8.3.3 Build version 8E3004b
DH-Yaroslav commented 5 years ago

I have the same issue...