From f9e9c90386ab6c750ada3595e28aab472b074dc3 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Tue, 18 Feb 2025 13:29:07 +0100 Subject: [PATCH] fix: swipe gesture in library page should not unintentionally trigger tap (#396) --- apps/readest-app/src/hooks/useLongPress.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/readest-app/src/hooks/useLongPress.ts b/apps/readest-app/src/hooks/useLongPress.ts index 4c9dc31a..5b332e1c 100644 --- a/apps/readest-app/src/hooks/useLongPress.ts +++ b/apps/readest-app/src/hooks/useLongPress.ts @@ -82,14 +82,6 @@ export const useLongPress = ({ const handlePointerUp = useCallback( (e: React.PointerEvent) => { - // Special case: if we don't have a pointerId or startPos, - // this might be a post-context-menu tap - if (pointerId.current === null && startPosRef.current === null) { - onTap?.(); - reset(); - return; - } - if (e.pointerId !== pointerId.current) return; if (!isLongPressTriggered.current && startPosRef.current) {