fix input element id (#23066)

This commit is contained in:
Alan Ren
2023-05-09 18:54:21 -07:00
committed by GitHub
parent 60a280042d
commit a2c30b0df8
2 changed files with 7 additions and 2 deletions

View File

@@ -75,8 +75,11 @@ export class InputBox extends vsInputBox implements AdsWidget {
if (this._sqlOptions.ariaDescription) { if (this._sqlOptions.ariaDescription) {
this.inputElement.setAttribute('aria-description', this._sqlOptions.ariaDescription); this.inputElement.setAttribute('aria-description', this._sqlOptions.ariaDescription);
} }
if (id !== undefined) {
this.inputElement.id = id; this.inputElement.id = id;
} }
}
public override style(styles: IInputBoxStyles): void { public override style(styles: IInputBoxStyles): void {
super.style(styles); super.style(styles);

View File

@@ -99,7 +99,9 @@ export class SelectBox extends vsSelectBox implements AdsWidget {
this.element = dom.append(container, $('.monaco-selectbox.idle')); this.element = dom.append(container, $('.monaco-selectbox.idle'));
} }
if (id !== undefined) {
this.selectElement.id = id; this.selectElement.id = id;
}
this._selectBoxOptions = selectBoxOptions; this._selectBoxOptions = selectBoxOptions;
let focusTracker = dom.trackFocus(this.selectElement); let focusTracker = dom.trackFocus(this.selectElement);
this._register(focusTracker); this._register(focusTracker);