From 2ecc6c6564f433aa0cb516ba54a85a98ec0efa96 Mon Sep 17 00:00:00 2001 From: Roman Pominov Date: Thu, 21 Jul 2022 17:20:29 +0300 Subject: [PATCH] disable touch scroll completely --- .../components/primitives/dnd/canvas.stories.tsx | 3 ++- .../components/primitives/dnd/sortable-list.stories.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/designer/app/shared/design-system/components/primitives/dnd/canvas.stories.tsx b/apps/designer/app/shared/design-system/components/primitives/dnd/canvas.stories.tsx index 7a6506acd0..ee2b3d9a89 100644 --- a/apps/designer/app/shared/design-system/components/primitives/dnd/canvas.stories.tsx +++ b/apps/designer/app/shared/design-system/components/primitives/dnd/canvas.stories.tsx @@ -281,7 +281,8 @@ export const Canvas = () => { width: 500, height: 500, overflow: "auto", - touchAction: dragItemId === undefined ? "none" : "auto", + // to make DnD work we have to disable scrolling using touch + touchAction: "none", "[data-id]": { cursor: dragItemId === undefined ? "grab" : "default", }, diff --git a/apps/designer/app/shared/design-system/components/primitives/dnd/sortable-list.stories.tsx b/apps/designer/app/shared/design-system/components/primitives/dnd/sortable-list.stories.tsx index 4711f33de3..da47bdb0f4 100644 --- a/apps/designer/app/shared/design-system/components/primitives/dnd/sortable-list.stories.tsx +++ b/apps/designer/app/shared/design-system/components/primitives/dnd/sortable-list.stories.tsx @@ -139,7 +139,9 @@ export const SortableList = ({ overflow: "auto", background: "white", color: "black", - touchAction: dragItemId === undefined ? "none" : "auto", + + // to make DnD work we have to disable scrolling using touch + touchAction: "none", }} ref={autoScrollHandlers.targetRef} onScroll={() => {