Skip to content

Commit 4988d5c

Browse files
committed
Clarify pointerup
1 parent 31ed846 commit 4988d5c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

assets/js/dashboard/components/graph.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,11 @@ function InnerGraph<T extends ReadonlyArray<number | null>>({
338338
return (
339339
<svg
340340
onClick={onClick}
341-
onPointerUp={onClick}
341+
onPointerUp={(e) => {
342+
if (e.pointerType === 'touch' && typeof onClick === 'function') {
343+
onClick()
344+
}
345+
}}
342346
ref={svgRef}
343347
viewBox={`0 0 ${width} ${height}`}
344348
className={classNames('w-full h-auto [touch-action:pan-y]', className)}

0 commit comments

Comments
 (0)