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:
Ed Sanders 2016-11-08 12:36:41 +00:00
parent 8336720a5f
commit f6a205d77f

View file

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