Switch from NWE to VE using 'Edit' tab

Bug: T143577
Change-Id: I19d942c879c9ccf70e95beb5f8de589eb6363039
This commit is contained in:
Ed Sanders 2016-09-06 17:02:48 -07:00
parent ed54a4b676
commit 3c25f3aede

View file

@ -570,7 +570,15 @@
if ( isLoading ) { if ( isLoading ) {
return; return;
} }
init.activateVe( 'visual' ); if ( active ) {
targetPromise.done( function ( target ) {
if ( target.mode === 'source' ) {
target.switchToVisualEditor();
}
} );
} else {
init.activateVe( 'visual' );
}
}, },
onEditSourceTabClick: function ( e ) { onEditSourceTabClick: function ( e ) {