Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frontend/src/components/ChatHistoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,14 @@ export function ChatHistoryList({
}
}, []);

// Cancel long-press when user starts scrolling (touch move)
const handleLongPressMove = useCallback(() => {
if (longPressTimerRef.current) {
clearTimeout(longPressTimerRef.current);
longPressTimerRef.current = null;
}
}, []);

// Cleanup long-press timer on unmount
useEffect(() => {
return () => {
Expand Down Expand Up @@ -610,6 +618,7 @@ export function ChatHistoryList({
onMouseUp={handleLongPressEnd}
onMouseLeave={handleLongPressEnd}
onTouchStart={() => isMobile && handleLongPressStart(conv.id)}
onTouchMove={handleLongPressMove}
onTouchEnd={handleLongPressEnd}
onTouchCancel={handleLongPressEnd}
className={`rounded-lg py-2 transition-all hover:text-primary cursor-pointer ${
Expand Down
Loading