mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Use onEditTabClick handler in SingleEditTab
Gives us extra functionality like checking for isUnmodifiedLeftClick which makes CTRL+click on SET not change the current page, as expected. Change-Id: Icb37d7383374ee63798443659a2bcb2f1545c8c5
This commit is contained in:
parent
8336720a5f
commit
f6a205d77f
|
@ -1023,12 +1023,7 @@
|
|||
} );
|
||||
// Allow instant switching to edit mode, without refresh
|
||||
$( '#ca-edit' ).on( 'click', function ( e ) {
|
||||
e.preventDefault();
|
||||
if ( isLoading ) {
|
||||
return;
|
||||
}
|
||||
trackActivateStart( { type: 'page', mechanism: 'click' } );
|
||||
activateTarget( isOnlyTabVE() ? 'visual' : 'source' );
|
||||
init.onEditTabClick( isOnlyTabVE() ? 'visual' : 'source', e );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue