ionic-team / ionic-team/ionic-framework

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

未关闭
#22,299 46 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug: external
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。