Skip to content

Commit 6e121d2

Browse files
committed
Revert "Removed preventDefault statements from handlers of passive events: onTouchMove, onTouchStart"
This reverts commit cc5341f.
1 parent cc5341f commit 6e121d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/innerSliderUtils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export const keyHandler = (e, accessibility, rtl) => {
316316
};
317317

318318
export const swipeStart = (e, swipe, draggable) => {
319-
e.target.tagName === "IMG";
319+
e.target.tagName === "IMG" && e.preventDefault();
320320
if (!swipe || (!draggable && e.type.indexOf("mouse") !== -1)) return "";
321321
return {
322322
dragging: true,
@@ -352,6 +352,7 @@ export const swipeMove = (e, spec) => {
352352
listWidth
353353
} = spec;
354354
if (scrolling) return;
355+
if (animating) return e.preventDefault();
355356
if (vertical && swipeToSlide && verticalSwiping) e.preventDefault();
356357
let swipeLeft,
357358
state = {};
@@ -420,6 +421,7 @@ export const swipeMove = (e, spec) => {
420421
}
421422
if (touchObject.swipeLength > 10) {
422423
state["swiping"] = true;
424+
e.preventDefault();
423425
}
424426
return state;
425427
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy