mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-03 02:16:51 +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 () {
|
mw.libs.ve.SwitchConfirmDialog.prototype.getSetupProcess = function () {
|
||||||
return mw.libs.ve.SwitchConfirmDialog.super.prototype.getSetupProcess.apply( this, arguments )
|
return mw.libs.ve.SwitchConfirmDialog.super.prototype.getSetupProcess.apply( this, arguments )
|
||||||
.next( function () {
|
.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 );
|
}, this );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue