Merge "Also allow opening in source mode if VE is unavailable on action=edit"

This commit is contained in:
jenkins-bot 2017-01-03 20:19:09 +00:00 committed by Gerrit Code Review
commit 4abdf21413

View file

@ -914,7 +914,12 @@
if ( isViewPage && uri.query.veaction in editModes ) {
mode = editModes[ uri.query.veaction ];
} else {
if ( init.isWikitextAvailable && getPreferredEditor() === 'wikitext' ) {
if ( init.isWikitextAvailable && (
getPreferredEditor() === 'wikitext' || (
!init.isVisualAvailable &&
[ 'edit', 'submit' ].indexOf( uri.query.action ) !== -1
)
) ) {
mode = 'source';
} else {
mode = 'visual';