Only reset summaryPrefixLength on user event

Bug: T263062
Change-Id: I323ce4dab0a430e2aeb906ae9cd5d6b48a179cff
This commit is contained in:
Ed Sanders 2020-09-21 20:38:40 +01:00
parent 5c2abccf2a
commit 9d3eea5fdf

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();
};