Skip to content

bug: ios, cannot disable Safari swipe to go back when running as PWA #22299

@lincolnthree

Description

@lincolnthree

Bug Report

Ionic version:

[ ] 4.x
[x] 5.x

Current behavior:

Swipe gesture cannot be disabled on native iOS or Android devices. When swiping back, if using [swipeGesture]=true the animation/back gesture will trigger in addition to browser navigation, resulting in what appears to be two simultaneous back navigation events, and sometimes, very inconsistent app state on completion.

Navigate to any URL on an iPad or Android device with browser swipe-back functionality. Navigate to another ion-page/route.

Drag finger from left edge of screen to right. Swipe gesture still triggers back navigation.

Expected behavior:
With [swipeGesture]=false, The swipe gesture should be prevented and browser back navigation should not occur. With [swipeGesture]=true only one of the browser back navigation or ionic built in back-transitions should occur, not both.

Steps to reproduce:

Generate a sample ionic application:

ionic start myApp sidemenu
ionic serve --external

set [swipeGesture]='false' on ion-router-outlet in app.component.html

Navigate to the URL on an iPad or Android device with browser swipe-back functionality. Navigate to another page.

Drag finger from left edge of screen to right. Swipe gesture still triggers back navigation.

Related code:

Any brand new ionic generated app will demonstrate this issue.

insert short code snippets here

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 6.11.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.3.5
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Utility:

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

System:

   NodeJS : v12.13.0 (/usr/local/lib/node_modules/node/bin/node)
   npm    : 6.14.5
   OS     : macOS Catalina

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: externalBugs in non-Ionic software that impact Ionic apps (I.e. WebKit, Angular, Android etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions