ionic-team / ionic-team/ionic-framework

feat: generic touch gestures (press, pinch, etc)

未关闭
#19,183 35 条评论 16 个 reaction 已指派 0 人 在 GitHub 查看
package: core type: feature request
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

# Feature Request

**Ionic version:**
ionic v4
ionic/angular: 4.7.1
ionic-cli: 5.2.5

**Describe the Feature Request**
Since Ionic 4 there are no more touch gestures like press (long press).
For a mobile framework, this is a very important part.
This have to be an official supported feature in such a UI.
The developer of Ionic should not hack for this feature.
Like [this](https://medium.com/madewithply/ionic-4-long-press-gestures-96cf1e44098b) or [this](https://stackoverflow.com/a/41322757/9251185).

**Describe Preferred Solution**
Ionic should provide this feature in an official way. No hacks. No polyfills.
I can not say which solution would be the best.
Maybe use Angular with Hammerjs. Or build an own touch lib.

**Related Code**
Ionic 3:

```html
Press me long.
```

```ts
import { Gesture } from 'ionic-angular/gestures/gesture';
// ...
this.pressGesture = new Gesture(this.nativeElement);
this.pressGesture.listen();
this.pressGesture.on('press', event => {/*...*/});
// ...
```

In Ionic 4 this is not possible anymore. 😢 Or did I miss something?
Any questions? I'm glad if I can help.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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