ionic-team / ionic-team/ionic-framework

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

Open
#22,299 46 comments 0 reactions 0 assignees View on GitHub
bug: external
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

# 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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.