From ceeac75510abac02a48b5f0088173667e38a8ca7 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Tue, 22 Jun 2021 18:03:49 +0300 Subject: [PATCH] Media Viewer: Allow right-click on image --- src/util/captureEvents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/captureEvents.ts b/src/util/captureEvents.ts index 509827588..f0c42ec1b 100644 --- a/src/util/captureEvents.ts +++ b/src/util/captureEvents.ts @@ -97,7 +97,7 @@ export function captureEvents(element: HTMLElement, options: CaptureOptions) { if (options.onRelease) { options.onRelease(e); } - } else if (options.onClick) { + } else if (options.onClick && (!('button' in e) || e.button === 0)) { options.onClick(e); } }