ArticleTarget: use existing initialEditSummary if present

Switching modes recreates the toolbar, so if someone has already edited the
save summary it shouldn't update the initialEditSummary to that.

Bug: T159686
Change-Id: I4109442853916bebae2bce804fcd6777e3eb6d34
This commit is contained in:
David Lynch 2017-03-09 12:05:12 -06:00
parent 832674fa85
commit 261d4e8974

View file

@ -1822,7 +1822,7 @@ ve.init.mw.ArticleTarget.prototype.setupToolbar = function () {
this.attachToolbarSaveButton();
if ( this.saveDialog ) {
this.initialEditSummary = this.saveDialog.editSummaryInput.getValue();
this.initialEditSummary = this.initialEditSummary || this.saveDialog.editSummaryInput.getValue();
this.saveDialog.disconnect( this );
this.saveDialog = null;
}