From 95f05ea4633d27fc9b1fbc6ded6d90cb34cd797d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Falco=CC=81n?= Date: Sun, 21 Jun 2026 10:58:48 +0200 Subject: [PATCH] fix(accounts): drop long-press drag so mobile can scroll The touch long-press sensor was capturing the gesture and blocking page scroll on mobile. Remove it and drive touch drag through the pointer sensor instead: grabbing the handle (the account type icon) starts the drag, the rest of the card scrolls. The subtle 'selection' haptic on drag start is kept. --- resources/js/components/sortable-grid.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/resources/js/components/sortable-grid.tsx b/resources/js/components/sortable-grid.tsx index 3d266c6d..cdb25f5f 100644 --- a/resources/js/components/sortable-grid.tsx +++ b/resources/js/components/sortable-grid.tsx @@ -6,7 +6,6 @@ import { type DragEndEvent, KeyboardSensor, PointerSensor, - TouchSensor, closestCenter, useSensor, useSensors, @@ -48,13 +47,11 @@ export function SortableGrid({ const ids = items.map(getId); const { trigger } = useWebHaptics(); - // Pointer drag starts after a small move (so clicks still work); touch drag - // starts on a long press, leaving quick swipes free to scroll the page. + // A small move starts the drag, so taps/clicks still work. Touch is handled + // via pointer events and only the handle has touch-action: none, so the rest + // of the card scrolls normally on mobile (no long-press, which blocked it). const sensors = useSensors( useSensor(PointerSensor, { activationConstraint: { distance: 8 } }), - useSensor(TouchSensor, { - activationConstraint: { delay: 200, tolerance: 8 }, - }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates, }),