diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 9993db659..4dddcc1ce 100755 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -168,6 +168,9 @@ $link.add( $enlarge ).click( function ( e ) { return bs.click( this, e, title ); } ); + // now that we have set up our real click handler we can we can remove the temporary + // handler added in mmv.head.js which just replays clicks to the real handler + $( document ).off( 'click.mmv-head' ); this.thumbsReadyDeferred.resolve(); }; diff --git a/resources/mmv/mmv.head.js b/resources/mmv/mmv.head.js index 7d43cffbb..69c02f3e1 100644 --- a/resources/mmv/mmv.head.js +++ b/resources/mmv/mmv.head.js @@ -24,7 +24,7 @@ return; } - $document.on( 'click', 'a.image', function ( e ) { + $document.on( 'click.mmv-head', 'a.image', function ( e ) { // Do not interfere with non-left clicks or if modifier keys are pressed. // Also, make sure we do not get in a loop. if ( ( e.which !== 0 && e.which !== 1 ) || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey || e.replayed ) {