From 2e31355741f7d7a837e5691cbee99db291e369b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 15 Apr 2021 08:10:03 +0200 Subject: [PATCH] Don't do anything if we didn't press the left button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/elements/ImageView.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index 71e63d214d..bb69e24855 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -209,6 +209,10 @@ export default class ImageView extends React.Component { ev.stopPropagation(); ev.preventDefault(); + // Don't do anything if we pressed any + // other button than the left one + if (ev.button !== 0) return; + // Zoom in if we are completely zoomed out if (this.state.zoom === MIN_ZOOM) { this.setState({zoom: MAX_ZOOM});