From 3145beca653a2a1c099aac13036604a263f9221b Mon Sep 17 00:00:00 2001 From: Horacio Daniel Ros Date: Thu, 30 Jul 2026 18:24:52 -0300 Subject: [PATCH] refactor: migrate touch and mouse click handling to native onClick event to improve interaction reliability --- .../src/app/components/CalendarRowView/CalendarRowView.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/txclient/src/app/components/CalendarRowView/CalendarRowView.tsx b/txclient/src/app/components/CalendarRowView/CalendarRowView.tsx index adcaef8..7923785 100644 --- a/txclient/src/app/components/CalendarRowView/CalendarRowView.tsx +++ b/txclient/src/app/components/CalendarRowView/CalendarRowView.tsx @@ -82,7 +82,7 @@ function EventItem({ const handleClick = () => { cancelPress(); - if (!isLongPress.current && !isScrolling.current) { + if (!isLongPress.current) { onClick(); } }; @@ -107,12 +107,13 @@ function EventItem({ WebkitUserSelect: "none", }} onTouchStart={startPress} - onTouchEnd={handleClick} + onTouchEnd={cancelPress} onTouchMove={handleTouchMove} onTouchCancel={cancelPress} onMouseDown={startPress} - onMouseUp={handleClick} + onMouseUp={cancelPress} onMouseLeave={cancelPress} + onClick={handleClick} onContextMenu={(e) => e.preventDefault()} // Prevent context menu on long press >