Skip to content

Commit

Permalink
Removed preventDefault statements from handlers of passive events: on…
Browse files Browse the repository at this point in the history
…TouchMove, onTouchStart
  • Loading branch information
MertTurel committed Jan 24, 2021
1 parent c2b148b commit cc5341f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/innerSliderUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {};
Expand Down Expand Up @@ -421,7 +420,6 @@ export const swipeMove = (e, spec) => {
}
if (touchObject.swipeLength > 10) {
state["swiping"] = true;
e.preventDefault();
}
return state;
};
Expand Down

0 comments on commit cc5341f

Please sign in to comment.