From 2282ee80c16a4dd8b361fd67511a6cbba582d841 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 2 Nov 2016 12:21:51 +0000 Subject: [PATCH] Store editor preference when switching to NWE This will also change the label of the single edit tab. Bug: T149795 Change-Id: I3e1afad61ed60eb6f58aceb023e2fed16f053542 --- modules/ve-mw/init/ve.init.mw.ArticleTarget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 2afbf8f9b5..81fc42a998 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -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' ); } };