From 22382413dcb0227c3863440fc747fe6aee66ea02 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 3 Feb 2023 15:42:47 -0500 Subject: [PATCH] Make drag and drop mobile-friendly --- src/video-grid/VideoTile.module.css | 1 - src/video-grid/VideoTileContainer.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video-grid/VideoTile.module.css b/src/video-grid/VideoTile.module.css index 05f3a0c..543e4fa 100644 --- a/src/video-grid/VideoTile.module.css +++ b/src/video-grid/VideoTile.module.css @@ -23,7 +23,6 @@ limitations under the License. border-radius: 20px; overflow: hidden; cursor: pointer; - touch-action: none; /* HACK: This has no visual effect due to the short duration, but allows the JS to detect movement via the transform property for audio spatialization */ diff --git a/src/video-grid/VideoTileContainer.tsx b/src/video-grid/VideoTileContainer.tsx index 28aec61..5bffc6c 100644 --- a/src/video-grid/VideoTileContainer.tsx +++ b/src/video-grid/VideoTileContainer.tsx @@ -103,7 +103,7 @@ export const VideoTileContainer: FC = memo( useDrag((state) => onDragRef.current!(item.id, state), { target: tileRef, filterTaps: true, - pointer: { buttons: [1] }, + preventScroll: true, }); const {