ionic-team / ionic-team/ionic-framework
feat: generic touch gestures (press, pinch, etc)
- Dominant language
- TypeScript
- Stars
- 52.7k
- Forks
- 13.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 51
Description
# 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.
Contributor guide
Research direction
Start by comparing the Ionic 3 Gesture API shown in the issue with the Ionic 4 gesture behavior, and review the proposed Angular/HammerJS approach and linked examples. Define the supported gesture set and API before implementing it; done should provide official press and other touch gestures without application-level hacks or polyfills.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100