ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

[v2] Cannot swipe to go back on iOS with tabs and tabsHideOnSubPages true

Open apparition47 opened this issue 10 years ago • 4 comments

Short description of the problem:

Cannot swipe to go back on iOS with tabs and tabsHideOnSubPages: true on 2.0.0-beta.11.

What behavior are you expecting?

When pushing pages onto the navigation stack with tabs on iOS, doing the swipe to go back gesture doesn't pop the navigation stack when tabsHideOnSubPages: true.

Steps to reproduce:

  1. Set a tabs template as rootPage.
  2. Push another page
  3. [iOS] Swipe back gesture to pop nav. Doesn't work unless I change tabsHideOnSubPages: false.

@Component({
    template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class MyApp {
    static get parameters() {
        return [..];
    }

    constructor(..) {
        this.rootPage = TabsPage;
    }
}
ionicBootstrap(
    MyApp,
    [...],
    {
        tabsHideOnSubPages: true,
        prodMode: true
    }
);

<ion-tabs primary selectedIndex="0">
  <ion-tab [root]="tab1Root" tabTitle="C" tabIcon="more"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="M" tabIcon="more"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="C" tabIcon="more"></ion-tab>
  <ion-tab [root]="tab4Root" tabTitle="A" tabIcon="more"></ion-tab>
</ion-tabs>
<ion-header>
    <ion-navbar primary>
        <ion-title>
            A
        </ion-title>
    </ion-navbar>
</ion-header>

<ion-content>
    <button ion-button block outline secondary [navPush]="SPage">
</ion-content>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 2.x

Plunker that shows an example of your issue

I created a plunkr however you need to test in a app environment on iOS. http://plnkr.co/edit/SLY1b5qTDwJErnSIuMHQ

Run ionic info from terminal/cmd prompt: (paste output below)

Your system information:

Cordova CLI: 6.3.0
Gulp version:  CLI version 3.8.11
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11-201608162233
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.5.0 
ios-sim version: 3.1.1 
OS: Mac OS X El Capitan
Node Version: v5.8.0
Xcode version: Xcode 7.3 Build version 7D175 

Note: iPhone 6 Plus iOS 9.3.5 WKWebView

apparition47 avatar Aug 31 '16 23:08 apparition47

I'm still seeing the same behaviour on 2.0.0-rc.0 with the following and tabs

app.module.ts

@NgModule({
    declarations: components,
    imports: [
        IonicModule.forRoot(MyApp, {tabsHideOnSubPages: true})
    ],
    bootstrap: [IonicApp],
    entryComponents: components,
    providers: [
        // ...
    ]
})

apparition47 avatar Oct 01 '16 18:10 apparition47

I have same issue

triasrahman avatar Oct 14 '16 19:10 triasrahman

same issue

ptqlc avatar Oct 17 '16 00:10 ptqlc

Working in a fix, looks like it is more complicated than expected...

manucorporat avatar Oct 30 '16 18:10 manucorporat