From 216e34c53c564b560ebad7df93aa118c24f63b3a Mon Sep 17 00:00:00 2001 From: mkljczk Date: Sun, 2 Mar 2025 20:00:55 +0100 Subject: [PATCH] pl-fe: useLongPress: double scroll threshold Signed-off-by: mkljczk --- packages/pl-fe/src/hooks/use-long-press.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pl-fe/src/hooks/use-long-press.ts b/packages/pl-fe/src/hooks/use-long-press.ts index dad95491a..41c67f943 100644 --- a/packages/pl-fe/src/hooks/use-long-press.ts +++ b/packages/pl-fe/src/hooks/use-long-press.ts @@ -44,7 +44,7 @@ type LongPressOptions = { }; const useLongPress = (callback: (e: Event) => void, options: LongPressOptions = {}) => { - const { threshold = 400, onStart, onFinish, onCancel, allowScroll = false, scrollThreshold = 20 } = options; + const { threshold = 400, onStart, onFinish, onCancel, allowScroll = false, scrollThreshold = 40 } = options; const isLongPressActive = React.useRef(false); const isPressed = React.useRef(false); const timerId = React.useRef();