Don't do anything if we didn't press the left button

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-04-15 08:10:03 +02:00
parent 72d8e6ccca
commit 2e31355741
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 4 additions and 0 deletions

View File

@ -209,6 +209,10 @@ export default class ImageView extends React.Component<IProps, IState> {
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});