mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-25 06:35:32 +00:00
fix(frontend): require 1s press-and-hold to drag tasks on mobile (#1987)
## Summary - Adds a 1-second press-and-hold delay before drag mode activates on touch devices - Allows users to tap tasks to open them on mobile without accidentally triggering drag mode - Only affects touch devices (desktop behavior unchanged via `delayOnTouchOnly`) Fixes #1986
This commit is contained in:
@@ -338,7 +338,7 @@ const DRAG_OPTIONS = {
|
|||||||
ghostClass: 'ghost',
|
ghostClass: 'ghost',
|
||||||
dragClass: 'task-dragging',
|
dragClass: 'task-dragging',
|
||||||
delayOnTouchOnly: true,
|
delayOnTouchOnly: true,
|
||||||
delay: 150,
|
delay: 1000,
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
const MIN_SCROLL_HEIGHT_PERCENT = 0.25
|
const MIN_SCROLL_HEIGHT_PERCENT = 0.25
|
||||||
|
|||||||
@@ -60,6 +60,8 @@
|
|||||||
type: 'transition-group'
|
type: 'transition-group'
|
||||||
}"
|
}"
|
||||||
:animation="100"
|
:animation="100"
|
||||||
|
:delay-on-touch-only="true"
|
||||||
|
:delay="1000"
|
||||||
ghost-class="task-ghost"
|
ghost-class="task-ghost"
|
||||||
@start="handleDragStart"
|
@start="handleDragStart"
|
||||||
@end="saveTaskPosition"
|
@end="saveTaskPosition"
|
||||||
|
|||||||
Reference in New Issue
Block a user