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

bug(angular, ios): routerDirection is reversed, when tapping current tab on root page of the tab #19759

Open
imnskh opened this issue Oct 26, 2019 · 3 comments
Labels
package: angular @ionic/angular package type: bug a confirmed bug report

Comments

@imnskh
Copy link

imnskh commented Oct 26, 2019

Bug Report

Ionic version:

4.11.1

Current behavior:
If you tap the current tab on the root page of the tab, the page transition other than the routerLink directive will reverse routerDirection on iOS.

Expected behavior:
No matter how many times you tap the tab, it should become the appropriate routerDirection.

Steps to reproduce:

  1. enable iOS mode
  2. go to /tabs/tab1 page
  3. tap button Tab One
  4. tap link navigateByUrl Page1

https://stackblitz.com/edit/ionic-v4-angular-tabs-mv5vvs

201910261953

Other information:

Is routerDirection rewritten when the current tab is tapped even if page transition does not occur?

https://github.com/ionic-team/ionic/blob/master/core/src/components/tab-button/tab-button.tsx#L92-L96
https://github.com/ionic-team/ionic/blob/master/angular/src/directives/navigation/ion-tabs.ts#L79

Ionic info:

Ionic:

   Ionic CLI                     : 5.4.1 (/Users/imnskh/.anyenv/envs/nodenv/versions/10.16.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.11.1
   @angular-devkit/build-angular : 0.803.9
   @angular-devkit/schematics    : 8.3.9
   @angular/cli                  : 8.3.9
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 3.1.2, (and 23 other plugins)

Utility:

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

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.2
   NodeJS     : v10.16.0 (/Users/imnskh/.anyenv/envs/nodenv/versions/10.16.0/bin/node)
   npm        : 6.12.0
   OS         : macOS Mojave
   Xcode      : Xcode 11.1 Build version 11A1027
@ionitron-bot ionitron-bot bot added the triage label Oct 26, 2019
@imnskh
Copy link
Author

imnskh commented Oct 26, 2019

it's already locked but probably the same problem #16917

@liamdebeasi liamdebeasi added package: angular @ionic/angular package type: bug a confirmed bug report labels Oct 28, 2019
@ionitron-bot ionitron-bot bot removed the triage label Oct 28, 2019
@moritzvieli
Copy link

Also stumbled across this one. Yes, seems to be related to #169917. You can easily reproduce it, by simple tapping on the active tab, when it's already active. Using [routerLink] solves it as a workaround.

@oOntheway
Copy link

@imnskh Use navigateForward can solve it.

...
import { NavController } from '@ionic/angular';
...
constructor(private nav: NavController)
...
this.nav.navigateForward(...)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

4 participants