mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
fix long press to work only on left click (#1493)
This commit is contained in:
@@ -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>);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user