From f6e4ba2b20a4e0b35e9241256991c96a290fd43e Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Tue, 12 Nov 2013 20:08:57 +0000 Subject: [PATCH] Don't interfere with middle click Bug: 56905 Change-Id: Ib612a77e825324f5b262bc757ae3dc4346d8b858 --- js/ext.multimediaViewer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ext.multimediaViewer.js b/js/ext.multimediaViewer.js index 5e694ac90..5e91c1de8 100755 --- a/js/ext.multimediaViewer.js +++ b/js/ext.multimediaViewer.js @@ -78,6 +78,11 @@ urls[index].filePageLink = filePageLink; $links.click( function ( e ) { + // Do not interfere with non-left clicks or if modifier keys are pressed. + if ( e.which !== 1 || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) { + return; + } + var $this = $( this ); if ( $this.is( 'a.image' ) ) {