Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/touch-support-extended' int…
Browse files Browse the repository at this point in the history
…o feat/touch-support-extended

# Conflicts:
#	src/modules/esl-carousel/plugin/touch/esl-carousel.touch.mixin.ts
  • Loading branch information
ala-n committed Jan 31, 2024
2 parents f26c3f5 + 6ec23ab commit 70e4a72
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ export class ESLCarouselTouchMixin extends ESLCarouselPlugin {

/** @returns if the event should prevent touch action */
protected isTouchActionPrevented(event: TouchEvent | PointerEvent | MouseEvent): boolean {
// Prevents content scrolled
// Prevents draggable state if the content is scrolled
if (isOffsetChanged(this.startEventOffset)) return true;
// Prevents if text is selected
// Prevents draggable state if the text is selected
if (document.getSelection()?.isCollapsed === false) return true;
// Early exit if swipe timeout tolerance is not reached
// Prevents draggable state if the offset is not reached tolerance or the swipe timeout
return this.isSwipeMode && event.timeStamp - this.startTimestamp > this.swipeTimeout;
}

Expand Down

0 comments on commit 70e4a72

Please sign in to comment.