From c5c61afb79deab7a4a178f947aacb31ac36ff8ec Mon Sep 17 00:00:00 2001 From: Vladimir Potekhin Date: Mon, 19 Aug 2024 12:56:11 +0300 Subject: [PATCH] chore: fix comment --- .../components/pull-to-refresh/pull-to-refresh.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts b/projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts index af03095c70d40..ae6a3af3ac69c 100644 --- a/projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts +++ b/projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts @@ -22,6 +22,7 @@ import { } from './pull-to-refresh.providers'; export const MICRO_OFFSET = 10 ** -6; +const EXCLUSION_SELECTORS = 'tui-dialog, tui-dropdown, tui-dropdown-mobile'; @Injectable() export class TuiPullToRefreshService extends Observable { @@ -33,8 +34,11 @@ export class TuiPullToRefreshService extends Observable { startWith(null), switchMap(() => tuiTypedFromEvent(this.element, 'touchstart', {passive: true}).pipe( - filter(() => !this.el.nativeElement.querySelector('tui-dialog')), - filter(() => !this.scrollTop), + filter( + () => + !this.el.nativeElement.querySelector(EXCLUSION_SELECTORS) && + !this.scrollTop, + ), map(({touches}) => touches[0].clientY), switchMap(start => tuiTypedFromEvent(this.element, 'touchmove').pipe(