From a59c87e475cf0823756376a475f8c423be8651e2 Mon Sep 17 00:00:00 2001 From: umeruma Date: Wed, 2 Oct 2019 11:46:42 +0900 Subject: [PATCH] fix: isPressed will be consedered PointerEvent on iOS13 fixes #122 --- src/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.js b/src/utils.js index dc863d5..abe28b2 100644 --- a/src/utils.js +++ b/src/utils.js @@ -33,6 +33,9 @@ export const degrees = (a) => { }; export const isPressed = (evt) => { + if (evt.type === 'pointerdown' || evt.type === 'pointermove') { + return true; + } if (isNaN(evt.buttons)) { return evt.pressure !== 0; }