Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
fix(pull): mark all touch event handlers as passive
Browse files Browse the repository at this point in the history
  • Loading branch information
garygrossgarten committed Jun 24, 2019
1 parent 00bf626 commit 9c94409
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions projects/core/src/lib/pull/pull.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import {
EventEmitter
} from '@angular/core';
import { IonContent, Platform } from '@ionic/angular';
import { fromEvent, merge, fromEventPattern } from 'rxjs';
import { fromEvent, merge } from 'rxjs';
import {
filter,
map,
skipWhile,
takeUntil,
takeLast,
tap
takeLast
} from 'rxjs/operators';

@Directive({
Expand Down Expand Up @@ -48,10 +47,10 @@ export class FivPull implements OnInit {
}

private setupPanListener() {
const touchstart$ = fromEvent(this.element.nativeElement, 'touchstart');
const touchstart$ = fromEvent(this.element.nativeElement, 'touchstart', { passive: true });
const touchmove$ = fromEvent(this.element.nativeElement, 'touchmove', { passive: true });
const touchend$ = fromEvent(this.element.nativeElement, 'touchend');
const touchcancel$ = fromEvent(this.element.nativeElement, 'touchcancel');
const touchend$ = fromEvent(this.element.nativeElement, 'touchend', { passive: true });
const touchcancel$ = fromEvent(this.element.nativeElement, 'touchcancel', { passive: true });
const end$ = merge(touchend$, touchcancel$);

const dragAtTop = touchstart$.pipe(
Expand Down

0 comments on commit 9c94409

Please sign in to comment.