Merge "Remove the temporary click handler once the final one is installed"

This commit is contained in:
jenkins-bot 2014-03-31 21:09:31 +00:00 committed by Gerrit Code Review
commit 7f4c30c31f
2 changed files with 4 additions and 1 deletions

View file

@ -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();
};

View file

@ -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 ) {