Store editor preference when switching to NWE

This will also change the label of the single edit tab.

Bug: T149795
Change-Id: I3e1afad61ed60eb6f58aceb023e2fed16f053542
This commit is contained in:
Ed Sanders 2016-11-02 12:21:51 +00:00
parent 3fb757c307
commit 2282ee80c1

View file

@ -197,6 +197,7 @@ ve.init.mw.ArticleTarget.prototype.setMode = function () {
if ( this.mode !== oldMode ) {
this.updateTabs( true );
mw.libs.ve.setEditorPreference( this.mode === 'visual' ? 'visualeditor' : 'wikitext' );
}
};