Open imnskh opened 4 years ago
it's already locked but probably the same problem https://github.com/ionic-team/ionic/issues/16917
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.
@imnskh Use navigateForward
can solve it.
...
import { NavController } from '@ionic/angular';
...
constructor(private nav: NavController)
...
this.nav.navigateForward(...)
...
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:
/tabs/tab1
pageTab One
navigateByUrl Page1
https://stackblitz.com/edit/ionic-v4-angular-tabs-mv5vvs
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: