From fd0ace48ff6214453dff11465b53f197406b844c Mon Sep 17 00:00:00 2001 From: xarmian Date: Fri, 24 Apr 2026 19:38:31 -0400 Subject: [PATCH] fix(web): long-press delay on mobile status-header drag (BUG-641) (#237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ListView's outer dndzone for status groups was missing `delayTouchStart`, so any touch on a group header was immediately interpreted as the start of a group-reorder drag. On mobile this meant trying to scroll the page by touching a header instead grabbed the header and dragged it with the finger — the page wouldn't scroll and the user couldn't reach content below the visible status bands. Mirror the inner item dndzone's `delayTouchStart: touchDragDelayMs` (500ms) on the outer group dndzone so the same long-press gesture is required to start a group reorder. Quick taps (collapse toggle) and short touch-drags (page scroll) now pass through unmolested; the existing drag-to-reorder behaviour is preserved behind the long-press, matching what already works for items inside a group. The `touchDragDelayMs` constant (line 46) was already in scope and already used for the inner dndzone, so this is a one-line addition. Verified manually on iOS at the running server: status headers no longer hijack scroll; long-press still reorders groups; tap-to-collapse unaffected. Verified: web/npm run build clean, go test ./... green. --- web/src/lib/components/collections/ListView.svelte | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/lib/components/collections/ListView.svelte b/web/src/lib/components/collections/ListView.svelte index 852444d6..c1cee58f 100644 --- a/web/src/lib/components/collections/ListView.svelte +++ b/web/src/lib/components/collections/ListView.svelte @@ -206,7 +206,15 @@ flipDurationMs, type: 'list-group', dropTargetClasses: ['group-drop-target'], - morphDisabled: true + morphDisabled: true, + /* On mobile, touching a group header to scroll the page used to + immediately seize the touch as the start of a group-reorder drag, + so the page wouldn't scroll and the group would fly around with + the finger. Mirror the inner item dndzone's `delayTouchStart` + (BUG-641): a 500ms long-press is required before drag activates, + which matches the existing intra-group item behaviour and lets + ordinary taps/scrolls pass through unmolested. */ + delayTouchStart: touchDragDelayMs }} onconsider={handleGroupConsider} onfinalize={handleGroupFinalize}