From 0f2c5dbce2182c53fa8f801c7f1d2d46c8f72fd6 Mon Sep 17 00:00:00 2001 From: ajnart Date: Sun, 12 Jun 2022 06:36:33 +0200 Subject: [PATCH] :fire: Remove keyboard usage to sort items --- src/components/AppShelf/AppShelf.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx index 8a6d20807..050857e23 100644 --- a/src/components/AppShelf/AppShelf.tsx +++ b/src/components/AppShelf/AppShelf.tsx @@ -4,13 +4,12 @@ import { closestCenter, DndContext, DragOverlay, - KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors, } from '@dnd-kit/core'; -import { arrayMove, SortableContext, sortableKeyboardCoordinates } from '@dnd-kit/sortable'; +import { arrayMove, SortableContext } from '@dnd-kit/sortable'; import { useLocalStorage } from '@mantine/hooks'; import { useConfig } from '../../tools/state'; @@ -45,15 +44,7 @@ const AppShelf = (props: any) => { const { colorScheme } = useMantineColorScheme(); const sensors = useSensors( - useSensor(TouchSensor, { - activationConstraint: { - delay: 250, - tolerance: 5, - }, - }), - useSensor(KeyboardSensor, { - coordinateGetter: sortableKeyboardCoordinates, - }), + useSensor(TouchSensor, {}), useSensor(MouseSensor, { // Require the mouse to move by 10 pixels before activating activationConstraint: {