Skip to content

Commit

Permalink
fix(longpress): prevent multitouch event emissioon (#1205)
Browse files Browse the repository at this point in the history
  • Loading branch information
pelord authored Mar 24, 2023
1 parent f7b1ab0 commit 4b89f11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/common/src/lib/context-menu/long-press.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export class LongPressDirective {

@HostListener('touchstart', ['$event'])
public touchstart(e: TouchEvent) {
if (e.touches.length > 1) {
this.touchEnd();
return;
}
this.touchTimeout = setTimeout(() => {
if (this.onlyIOS) {
if (userAgent.getOSName() === 'iOS') {
Expand Down

0 comments on commit 4b89f11

Please sign in to comment.