Skip to content

Commit

Permalink
chore: fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin committed Aug 19, 2024
1 parent bacb056 commit c5c61af
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<number> {
Expand All @@ -33,8 +34,11 @@ export class TuiPullToRefreshService extends Observable<number> {
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(
Expand Down

0 comments on commit c5c61af

Please sign in to comment.