diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 3eb4f64e25..4a43dc5512 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -927,7 +927,6 @@ ve.init.mw.DesktopArticleTarget.prototype.openSaveDialog = function () { checkboxFields: this.checkboxFields, checkboxesByName: this.checkboxesByName } ); - this.initialEditSummary = undefined; }; /** diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index fd77e0c791..abf8c4f083 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -1195,7 +1195,7 @@ ve.init.mw.ArticleTarget.prototype.startSave = function ( saveDeferred ) { if ( +mw.user.options.get( 'forceeditsummary' ) && - saveOptions.summary === '' && + ( saveOptions.summary === '' || saveOptions.summary === this.initialEditSummary ) && !this.saveDialog.messages.missingsummary ) { this.saveDialog.showMessage( diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js index 3c38a848c1..9f7d84f218 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js @@ -28,6 +28,7 @@ ve.ui.MWSaveDialog = function VeUiMwSaveDialog( config ) { this.setupDeferred = $.Deferred(); this.target = null; this.checkboxesByName = null; + this.changedEditSummary = false; // Initialization this.$element.addClass( 've-ui-mwSaveDialog' ); @@ -382,6 +383,7 @@ ve.ui.MWSaveDialog.prototype.initialize = function () { // Limit byte length, and display the remaining bytes this.editSummaryInput.$input.byteLimit( this.editSummaryByteLimit ); this.editSummaryInput.on( 'change', function () { + dialog.changedEditSummary = true; // TODO: This looks a bit weird, there is no unit in the UI, just numbers // Users likely assume characters but then it seems to count down quicker // than expected. Facing users with the word "byte" is bad? (bug 40035) @@ -480,7 +482,7 @@ ve.ui.MWSaveDialog.prototype.getSetupProcess = function ( data ) { return ve.ui.MWSaveDialog.super.prototype.getSetupProcess.call( this, data ) .next( function () { this.target = data.target; - if ( data.editSummary !== undefined ) { + if ( !this.changedEditSummary ) { this.setEditSummary( data.editSummary ); } this.setupCheckboxes( data.checkboxFields || [] );