From fc2c0e899a6a8dde201cf224b3d3b2105f98a536 Mon Sep 17 00:00:00 2001 From: Cory Parsnipson Date: Thu, 23 Jun 2022 17:12:04 -0700 Subject: [PATCH] Remove preventDefault from swipeable and tappable. This was prevent carousel particles that contained clickable items from working properly on mobile devices. Removing preventDefault from both locations allows these items to response properly when clicked. No adverse behavior had been observed. Tested on a Pixel 2 phone monitored with chrome dev tools. --- src/actions/swipeable/swipeable.js | 1 - src/actions/tappable/tappable.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/actions/swipeable/swipeable.js b/src/actions/swipeable/swipeable.js index e6993b9..d4f8bf8 100644 --- a/src/actions/swipeable/swipeable.js +++ b/src/actions/swipeable/swipeable.js @@ -70,7 +70,6 @@ export function swipeable(node, { thresholdProvider }) { } function handleUp(event) { - event.preventDefault(); removeEndEventListener(window, handleUp) removeMoveEventListener(window, handleMove) diff --git a/src/actions/tappable/tappable.js b/src/actions/tappable/tappable.js index 8db35d6..40b947f 100644 --- a/src/actions/tappable/tappable.js +++ b/src/actions/tappable/tappable.js @@ -42,7 +42,6 @@ export function tappable(node) { } function handleTapend(event) { - event.preventDefault(); removeFocusoutEventListener(node, handleTapend) const touch = event.changedTouches[0]