fix: Make right clicking no longer drag images in the image viewer
This commit is contained in:
1 parent
ab80d3388e
commit
2e5663b4ac
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Right clicks no longer drag images in the viewer.
|
||||
@@ -74,7 +74,7 @@ export const useImageGestures = (active: boolean, step = 0.2, min = 0.1, max = 5
|
||||
|
||||
const onPointerDown = useCallback(
|
||||
(e: React.PointerEvent) => {
|
||||
if (!active) return;
|
||||
if (!active || (e.pointerType === 'mouse' && e.button === 2)) return;
|
||||
|
||||
e.stopPropagation();
|
||||
const target = e.target as HTMLElement;
|
||||
|
||||
Reference in new issue
Block a user