mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Don't allow keeping changes when switching from wikitext *section* editing
Bug: T117713 Change-Id: I16f17fa2aa4c9a1b74d8cde072c611e2685f5448
This commit is contained in:
parent
6341c4a3b5
commit
9c7a058b09
|
@ -69,7 +69,14 @@ mw.libs.ve.SwitchConfirmDialog.static.actions = [
|
|||
mw.libs.ve.SwitchConfirmDialog.prototype.getSetupProcess = function () {
|
||||
return mw.libs.ve.SwitchConfirmDialog.super.prototype.getSetupProcess.apply( this, arguments )
|
||||
.next( function () {
|
||||
this.actions.setMode( mw.config.get( 'wgVisualEditorConfig' ).fullRestbaseUrl ? 'restbase' : 'simple' );
|
||||
if (
|
||||
mw.config.get( 'wgVisualEditorConfig' ).fullRestbaseUrl &&
|
||||
!$( 'input[name=wpSection]' ).val()
|
||||
) {
|
||||
this.actions.setMode( 'restbase' );
|
||||
} else {
|
||||
this.actions.setMode( 'simple' );
|
||||
}
|
||||
}, this );
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue