Update drop-down selected value in accessibility mode (#15202)

This commit is contained in:
Karl Burtram
2021-04-21 12:56:54 -07:00
committed by GitHub
parent 6951bf3b90
commit 2f02b0bb52

View File

@@ -96,9 +96,13 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
this._register(this._selectBox);
this._register(attachSelectBoxStyler(this._selectBox, this.themeService));
this._register(this._selectBox.onDidSelect(async e => {
if (!this.editable) {
// also update the selected value here while in accessibility mode since the read-only selectbox
// is used even if the editable flag is true
if (!this.editable || (this._isInAccessibilityMode && !this.loading)) {
this.setSelectedValue(e.selected);
await this.validate();
}
if (!this.editable) {
// This is currently sending the ISelectData as the args, but to change this now would be a breaking
// change for extensions using it. So while not ideal this should be left as is for the time being.
this.fireEvent({