From 56239d693388a26115415bc2eca96a1fed052cb8 Mon Sep 17 00:00:00 2001 From: Alex Reardon Date: Wed, 8 May 2019 10:32:43 +1000 Subject: [PATCH] fixing firefox touch dragging (#1296) --- src/view/use-drag-handle/sensor/use-touch-sensor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/use-drag-handle/sensor/use-touch-sensor.js b/src/view/use-drag-handle/sensor/use-touch-sensor.js index 62bb4eeef9..dfdff23510 100644 --- a/src/view/use-drag-handle/sensor/use-touch-sensor.js +++ b/src/view/use-drag-handle/sensor/use-touch-sensor.js @@ -181,7 +181,8 @@ export default function useTouchSensor(args: Args): OnTouchStart { eventName: 'touchmove', // Opting out of passive touchmove (default) so as to prevent scrolling while moving // Not worried about performance as effect of move is throttled in requestAnimationFrame - options: { passive: false }, + // Using `capture: false` due to a recent horrible firefox bug: https://twitter.com/alexandereardon/status/1125904207184187393 + options: { passive: false, capture: false }, fn: (event: TouchEvent) => { // Drag has not yet started and we are waiting for a long press. if (!isDraggingRef.current) {