mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 04:43:18 +00:00
Merge "Remove the temporary click handler once the final one is installed"
This commit is contained in:
commit
7f4c30c31f
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue