mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix bug where select box selection could not be changed by mouse (#1616)
This commit is contained in:
@@ -541,21 +541,22 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio
|
|||||||
|
|
||||||
this.selectList.setFocus([this.selected]);
|
this.selectList.setFocus([this.selected]);
|
||||||
this.selectList.reveal(this.selectList.getFocus()[0]);
|
this.selectList.reveal(this.selectList.getFocus()[0]);
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}} - Update the selection before firing the handler instead of after
|
||||||
|
// Reset Selection Handler
|
||||||
|
this._currentSelection = -1;
|
||||||
|
this.hideSelectDropDown(true);
|
||||||
|
|
||||||
this._onDidSelect.fire({
|
this._onDidSelect.fire({
|
||||||
index: this.selectElement.selectedIndex,
|
index: this.selectElement.selectedIndex,
|
||||||
selected: this.selectElement.title
|
selected: this.selectElement.title
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reset Selection Handler
|
|
||||||
this._currentSelection = -1;
|
|
||||||
this.hideSelectDropDown(true);
|
|
||||||
}
|
}
|
||||||
dom.EventHelper.stop(e);
|
dom.EventHelper.stop(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// List Exit - passive - hide drop-down, fire onDidSelect
|
// List Exit - passive - hide drop-down, fire onDidSelect
|
||||||
private onListBlur(): void {
|
private onListBlur(): void {
|
||||||
|
|
||||||
if (this._currentSelection >= 0) {
|
if (this._currentSelection >= 0) {
|
||||||
this.select(this._currentSelection);
|
this.select(this._currentSelection);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user