Skip to content

Commit cc5341f

Browse files
committed
Removed preventDefault statements from handlers of passive events: onTouchMove, onTouchStart
1 parent c2b148b commit cc5341f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/innerSliderUtils.js

Lines changed: 1 addition & 3 deletions
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" && e.preventDefault();
319+
e.target.tagName === "IMG";
320320
if (!swipe || (!draggable && e.type.indexOf("mouse") !== -1)) return "";
321321
return {
322322
dragging: true,
@@ -352,7 +352,6 @@ export const swipeMove = (e, spec) => {
352352
listWidth
353353
} = spec;
354354
if (scrolling) return;
355-
if (animating) return e.preventDefault();
356355
if (vertical && swipeToSlide && verticalSwiping) e.preventDefault();
357356
let swipeLeft,
358357
state = {};
@@ -421,7 +420,6 @@ export const swipeMove = (e, spec) => {
421420
}
422421
if (touchObject.swipeLength > 10) {
423422
state["swiping"] = true;
424-
e.preventDefault();
425423
}
426424
return state;
427425
};

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