From cc5341f28c800c2b33ff033e2e845d4fb50d4243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20Tu=CC=88rel?= Date: Sun, 24 Jan 2021 18:39:39 +0300 Subject: [PATCH] Removed preventDefault statements from handlers of passive events: onTouchMove, onTouchStart --- src/utils/innerSliderUtils.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/innerSliderUtils.js b/src/utils/innerSliderUtils.js index 9c8465276..31e95c963 100644 --- a/src/utils/innerSliderUtils.js +++ b/src/utils/innerSliderUtils.js @@ -316,7 +316,7 @@ export const keyHandler = (e, accessibility, rtl) => { }; export const swipeStart = (e, swipe, draggable) => { - e.target.tagName === "IMG" && e.preventDefault(); + e.target.tagName === "IMG"; if (!swipe || (!draggable && e.type.indexOf("mouse") !== -1)) return ""; return { dragging: true, @@ -352,7 +352,6 @@ export const swipeMove = (e, spec) => { listWidth } = spec; if (scrolling) return; - if (animating) return e.preventDefault(); if (vertical && swipeToSlide && verticalSwiping) e.preventDefault(); let swipeLeft, state = {}; @@ -421,7 +420,6 @@ export const swipeMove = (e, spec) => { } if (touchObject.swipeLength > 10) { state["swiping"] = true; - e.preventDefault(); } return state; };