提交 19be2da5 编写于 作者: C Christopher Leidigh

SelectBox: Fix select title. Fixes: #73844

上级 65265073
......@@ -191,6 +191,9 @@ export class SelectBoxList implements ISelectBoxDelegate, IListVirtualDelegate<I
index: e.target.selectedIndex,
selected: e.target.value
});
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
this.selectElement.title = this.options[this.selected].text;
}
}));
// Have to implement both keyboard and mouse controllers to handle disabled options
......@@ -282,6 +285,9 @@ export class SelectBoxList implements ISelectBoxDelegate, IListVirtualDelegate<I
}
this.selectElement.selectedIndex = this.selected;
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
this.selectElement.title = this.options[this.selected].text;
}
}
public setAriaLabel(label: string): void {
......@@ -395,7 +401,7 @@ export class SelectBoxList implements ISelectBoxDelegate, IListVirtualDelegate<I
let listBackground = this.styles.selectListBackground ? this.styles.selectListBackground.toString() : background;
this.selectDropDownListContainer.style.backgroundColor = listBackground;
this.selectionDetailsPane.style.backgroundColor = listBackground;
const optionsBorder = this.styles.focusBorder ? this.styles.focusBorder.toString() : null;
const optionsBorder = this.styles.focusBorder ? this.styles.focusBorder.toString() : '';
this.selectDropDownContainer.style.outlineColor = optionsBorder;
this.selectDropDownContainer.style.outlineOffset = '-1px';
}
......@@ -798,7 +804,11 @@ export class SelectBoxList implements ISelectBoxDelegate, IListVirtualDelegate<I
this._onDidSelect.fire({
index: this.selectElement.selectedIndex,
selected: this.options[this.selected].text
});
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
this.selectElement.title = this.options[this.selected].text;
}
}
this.hideSelectDropDown(true);
......@@ -891,6 +901,9 @@ export class SelectBoxList implements ISelectBoxDelegate, IListVirtualDelegate<I
index: this.selectElement.selectedIndex,
selected: this.options[this.selected].text
});
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
this.selectElement.title = this.options[this.selected].text;
}
}
this.hideSelectDropDown(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册