You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Don't do anything if we didn't press the left button
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -209,6 +209,10 @@ export default class ImageView extends React.Component<IProps, IState> {
|
|||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
ev.preventDefault();
|
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
|
// Zoom in if we are completely zoomed out
|
||||||
if (this.state.zoom === MIN_ZOOM) {
|
if (this.state.zoom === MIN_ZOOM) {
|
||||||
this.setState({zoom: MAX_ZOOM});
|
this.setState({zoom: MAX_ZOOM});
|
||||||
|
|||||||
Reference in New Issue
Block a user