提交 6e5a73c6 编写于 作者: B Benjamin Pasero

actually fix #94775

上级 3d9f459a
...@@ -662,7 +662,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi ...@@ -662,7 +662,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
this.ui.list.clearFocus(); this.ui.list.clearFocus();
} }
})); }));
this.visibleDisposables.add(this.ui.inputBox.onKeyDown(event => { this.visibleDisposables.add((this._hideInput ? this.ui.list : this.ui.inputBox).onKeyDown((event: KeyboardEvent | StandardKeyboardEvent) => {
switch (event.keyCode) { switch (event.keyCode) {
case KeyCode.DownArrow: case KeyCode.DownArrow:
this.ui.list.focus(QuickInputListFocus.Next); this.ui.list.focus(QuickInputListFocus.Next);
......
...@@ -263,6 +263,8 @@ export class QuickInputList { ...@@ -263,6 +263,8 @@ export class QuickInputList {
onChangedCheckedElements: Event<IQuickPickItem[]> = this._onChangedCheckedElements.event; onChangedCheckedElements: Event<IQuickPickItem[]> = this._onChangedCheckedElements.event;
private readonly _onButtonTriggered = new Emitter<IQuickPickItemButtonEvent<IQuickPickItem>>(); private readonly _onButtonTriggered = new Emitter<IQuickPickItemButtonEvent<IQuickPickItem>>();
onButtonTriggered = this._onButtonTriggered.event; onButtonTriggered = this._onButtonTriggered.event;
private readonly _onKeyDown = new Emitter<StandardKeyboardEvent>();
onKeyDown: Event<StandardKeyboardEvent> = this._onKeyDown.event;
private readonly _onLeave = new Emitter<void>(); private readonly _onLeave = new Emitter<void>();
onLeave: Event<void> = this._onLeave.event; onLeave: Event<void> = this._onLeave.event;
private _fireCheckedEvents = true; private _fireCheckedEvents = true;
...@@ -313,6 +315,8 @@ export class QuickInputList { ...@@ -313,6 +315,8 @@ export class QuickInputList {
} }
break; break;
} }
this._onKeyDown.fire(event);
})); }));
this.disposables.push(this.list.onMouseDown(e => { this.disposables.push(this.list.onMouseDown(e => {
if (e.browserEvent.button !== 2) { if (e.browserEvent.button !== 2) {
...@@ -347,6 +351,7 @@ export class QuickInputList { ...@@ -347,6 +351,7 @@ export class QuickInputList {
this._onChangedCheckedElements, this._onChangedCheckedElements,
this._onButtonTriggered, this._onButtonTriggered,
this._onLeave, this._onLeave,
this._onKeyDown
); );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册