mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 04:43:18 +00:00
Merge "Open the download panel when an image is right clicked"
This commit is contained in:
commit
540e7028be
|
@ -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();
|
||||
}
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue