diff --git a/resources/mmv/ui/mmv.ui.canvas.js b/resources/mmv/ui/mmv.ui.canvas.js index 33d60293b..c8b56225f 100644 --- a/resources/mmv/ui/mmv.ui.canvas.js +++ b/resources/mmv/ui/mmv.ui.canvas.js @@ -214,9 +214,14 @@ } } ); + // open the download panel on right clicking the image this.$image.on( 'mousedown.mmv-canvas', function ( e ) { if ( e.which === 3 ) { mw.mmv.actionLogger.log( 'right-click-image' ); + if ( !canvas.downloadOpen ) { + $( document ).trigger( 'mmv-download-open', e ); + e.stopPropagation(); + } } } ); }; diff --git a/resources/mmv/ui/mmv.ui.dialog.js b/resources/mmv/ui/mmv.ui.dialog.js index e3ce8aca2..53118f679 100644 --- a/resources/mmv/ui/mmv.ui.dialog.js +++ b/resources/mmv/ui/mmv.ui.dialog.js @@ -132,7 +132,8 @@ // Don't close the dialog if the click inside a dialog or on an navigation arrow if ( $clickTarget.closest( dialog.$dialog ).length || $clickTarget.closest( '.mw-mmv-next-image' ).length - || $clickTarget.closest( '.mw-mmv-prev-image' ).length ) { + || $clickTarget.closest( '.mw-mmv-prev-image' ).length + || e.which === 3 ) { return; }