Skip to content

Commit 9edb6f3

Browse files
authored
Merge pull request #100 from FRC2713/ty/hold_fix
fix: prevent device long-press context menu on action tracker buttons
2 parents 138e498 + 7b3b528 commit 9edb6f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/inputs/ActionTrackerInput.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,10 @@ export default function ActionTrackerInput(props: ConfigurableInputProps) {
487487
key={action.code}
488488
variant="secondary"
489489
className={cn(
490-
'h-auto min-h-16 flex-col gap-1 text-wrap py-3 touch-none select-none',
490+
'h-auto min-h-16 flex-col gap-1 text-wrap py-3 touch-none select-none [-webkit-touch-callout:none]',
491491
isBeingHeld && 'ring-2 ring-primary ring-offset-2 !bg-primary/20 animate-pulse',
492492
)}
493+
onContextMenu={e => e.preventDefault()}
493494
onPointerDown={e => handlePointerDown(e, action.code)}
494495
onPointerMove={handlePointerMove}
495496
onPointerUp={e => {

0 commit comments

Comments
 (0)