diff --git a/src/actions/swipeable/event.js b/src/actions/swipeable/event.js index 49d4d18..413c93a 100644 --- a/src/actions/swipeable/event.js +++ b/src/actions/swipeable/event.js @@ -1,7 +1,7 @@ // start event export function addStartEventListener(source, cb) { source.addEventListener('mousedown', cb) - source.addEventListener('touchstart', cb) + source.addEventListener('touchstart', cb, { passive: true }) } export function removeStartEventListener(source, cb) { source.removeEventListener('mousedown', cb) diff --git a/src/actions/tappable/event.js b/src/actions/tappable/event.js index 855e11d..0283462 100644 --- a/src/actions/tappable/event.js +++ b/src/actions/tappable/event.js @@ -1,6 +1,6 @@ // tap start event export function addFocusinEventListener(source, cb) { - source.addEventListener('touchstart', cb) + source.addEventListener('touchstart', cb, { passive: true }) } export function removeFocusinEventListener(source, cb) { source.removeEventListener('touchstart', cb)