mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-09-24 10:48:29 +00:00
Don't open images if control keys are pressed
This replicates the behavior of the MultimediaViewer on the desktop when using the mobile page with a desktop browser. But we have to be careful that this change don't break other extensions or functions of the skin. Bug: T206348 Change-Id: Ib4b928eae136d781782dc96e82d653806587292b
This commit is contained in:
parent
c9dee311ea
commit
9e114731ce
|
@ -24,6 +24,12 @@
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
function onClickImage( ev ) {
|
function onClickImage( ev ) {
|
||||||
|
// Do not interfere with non-left clicks or if modifier keys are pressed.
|
||||||
|
if ( ( ev.button !== 0 && ev.which !== 1 ) ||
|
||||||
|
ev.altKey || ev.ctrlKey || ev.shiftKey || ev.metaKey ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
routeThumbnail( $( this ).data( 'thumb' ) );
|
routeThumbnail( $( this ).data( 'thumb' ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue