Merge "Only reset summaryPrefixLength on user event"

This commit is contained in:
jenkins-bot 2020-09-21 21:06:29 +00:00 committed by Gerrit Code Review
commit db82dce31f

View file

@ -299,16 +299,20 @@ ReplyWidget.prototype.toggleAdvanced = function ( showAdvanced ) {
} else {
this.focus();
}
this.onEditSummaryChange();
this.storeEditSummary();
this.storage.set( this.storagePrefix + '/showAdvanced', this.showAdvanced ? '1' : '' );
};
ReplyWidget.prototype.onEditSummaryChange = function () {
this.storage.set( this.storagePrefix + '/summary', this.getEditSummary() );
this.storeEditSummary();
// After first subsequent edit, reset this so auto-select no longer happens
this.summaryPrefixLength = null;
};
ReplyWidget.prototype.storeEditSummary = function () {
this.storage.set( this.storagePrefix + '/summary', this.getEditSummary() );
};
ReplyWidget.prototype.getEditSummary = function () {
return this.editSummaryInput.getValue();
};