From 2f3128a273dfba341b56a358601ac663a0e34bf8 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Wed, 16 Oct 2024 14:46:10 +0300 Subject: [PATCH 1/2] fix(for-of): removing warnings about passive listeners --- .../scroll-inertia/scroll_inertia.directive.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts b/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts index 3985e55b3ec..f42c4a87182 100644 --- a/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts @@ -69,10 +69,10 @@ export class IgxScrollInertiaDirective implements OnInit, OnDestroy { return; } const targetElem = this.parentElement; - targetElem.addEventListener('wheel', this.onWheel.bind(this)); - targetElem.addEventListener('touchstart', this.onTouchStart.bind(this)); - targetElem.addEventListener('touchmove', this.onTouchMove.bind(this)); - targetElem.addEventListener('touchend', this.onTouchEnd.bind(this)); + targetElem.addEventListener('wheel', this.onWheel.bind(this), { passive: false }); + targetElem.addEventListener('touchstart', this.onTouchStart.bind(this), { passive: false }); + targetElem.addEventListener('touchmove', this.onTouchMove.bind(this), { passive: false }); + targetElem.addEventListener('touchend', this.onTouchEnd.bind(this), { passive: false }); }); } @@ -82,7 +82,7 @@ export class IgxScrollInertiaDirective implements OnInit, OnDestroy { if (!targetElem) { return; } - targetElem.removeEventListener('wheel', this.onWheel); + targetElem.removeEventListener('wheel', this.onWheel, ); targetElem.removeEventListener('touchstart', this.onTouchStart); targetElem.removeEventListener('touchmove', this.onTouchMove); targetElem.removeEventListener('touchend', this.onTouchEnd); From d4dc03b5f02ed6c2056b09b86f9bd7320f868127 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Wed, 16 Oct 2024 14:47:21 +0300 Subject: [PATCH 2/2] chore(*): removing left-over change --- .../lib/directives/scroll-inertia/scroll_inertia.directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts b/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts index f42c4a87182..2e7a0460c25 100644 --- a/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/scroll-inertia/scroll_inertia.directive.ts @@ -82,7 +82,7 @@ export class IgxScrollInertiaDirective implements OnInit, OnDestroy { if (!targetElem) { return; } - targetElem.removeEventListener('wheel', this.onWheel, ); + targetElem.removeEventListener('wheel', this.onWheel); targetElem.removeEventListener('touchstart', this.onTouchStart); targetElem.removeEventListener('touchmove', this.onTouchMove); targetElem.removeEventListener('touchend', this.onTouchEnd);