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 { } else {
this.focus(); this.focus();
} }
this.onEditSummaryChange(); this.storeEditSummary();
this.storage.set( this.storagePrefix + '/showAdvanced', this.showAdvanced ? '1' : '' ); this.storage.set( this.storagePrefix + '/showAdvanced', this.showAdvanced ? '1' : '' );
}; };
ReplyWidget.prototype.onEditSummaryChange = function () { 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 // After first subsequent edit, reset this so auto-select no longer happens
this.summaryPrefixLength = null; this.summaryPrefixLength = null;
}; };
ReplyWidget.prototype.storeEditSummary = function () {
this.storage.set( this.storagePrefix + '/summary', this.getEditSummary() );
};
ReplyWidget.prototype.getEditSummary = function () { ReplyWidget.prototype.getEditSummary = function () {
return this.editSummaryInput.getValue(); return this.editSummaryInput.getValue();
}; };