fix long press to work only on left click (#1493)

This commit is contained in:
jeffvli
2026-01-04 01:53:34 -08:00
parent af055ab6dd
commit 3122c1a058
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -56,6 +56,9 @@ export const useLongPress = <T extends HTMLElement = HTMLElement>({
const handleMouseDown = useCallback(
(event: React.MouseEvent) => {
if (event.button !== 0) {
return;
}
event.preventDefault();
start(event as React.MouseEvent<T>);
},