提交 98629bb4 编写于 作者: C Christof Marti

No initial focus item (fixes #46949)

上级 30875a1c
......@@ -137,6 +137,7 @@ export class QuickInputService extends Component implements IQuickInputService {
// Defer to avoid the input field reacting to the triggering key.
setTimeout(() => {
this.inputBox.setFocus();
this.checkboxList.clearFocus();
}, 0);
}));
this.toUnbind.push(
......
......@@ -263,8 +263,7 @@ export class QuickInputCheckboxList {
}));
this.elementDisposables.push(...this.elements.map(element => element.onChecked(() => this.fireCheckedEvents())));
this.list.splice(0, this.list.length, this.elements);
this.list.setSelection([]);
this.list.focusFirst();
this.list.setFocus([]);
}
getCheckedElements() {
......@@ -277,6 +276,10 @@ export class QuickInputCheckboxList {
this.list.reveal(this.list.getFocus()[0]);
}
clearFocus() {
this.list.setFocus([]);
}
domFocus() {
this.list.domFocus();
}
......@@ -329,8 +332,7 @@ export class QuickInputCheckboxList {
});
this.list.splice(0, this.list.length, this.elements.filter(element => !element.hidden));
this.list.setSelection([]);
this.list.focusFirst();
this.list.setFocus([]);
this.list.layout();
this._onAllVisibleCheckedChanged.fire(this.getAllVisibleChecked());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册