mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Hacks to get VE loading on mobile while user has NWE enabled
* ext.visualEditor.mwwikitext does not have mobile target * We call mw.libs.ve.setEditorPreference from ArticleTarget Change-Id: Ifae6e951155c83b13f3111732b0dc500349b1df2
This commit is contained in:
parent
6913a736fd
commit
81e32c6a4b
|
@ -197,7 +197,10 @@ ve.init.mw.ArticleTarget.prototype.setMode = function () {
|
|||
|
||||
if ( this.mode !== oldMode ) {
|
||||
this.updateTabs( true );
|
||||
mw.libs.ve.setEditorPreference( this.mode === 'visual' ? 'visualeditor' : 'wikitext' );
|
||||
if ( mw.libs.ve.setEditorPreference ) {
|
||||
// only set up by DAT.init
|
||||
mw.libs.ve.setEditorPreference( this.mode === 'visual' ? 'visualeditor' : 'wikitext' );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
(
|
||||
mw.user.options.get( 'visualeditor-newwikitext' ) ||
|
||||
new mw.Uri().query.veaction === 'editsource'
|
||||
)
|
||||
) &&
|
||||
mw.loader.getState( 'ext.visualEditor.mwwikitext' )
|
||||
) {
|
||||
modules.push( 'ext.visualEditor.mwwikitext' );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue