Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide kernel quick pick on focus out #12220

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ export class NotebookKernelSourceSelector implements INotebookKernelSourceSelect
matchOnDescription: true,
matchOnDetail: true,
supportBackInFirstStep: true,
activeItem: undefined
activeItem: undefined,
ignoreFocusOut: false
});
return { quickPick, selection: selection as Promise<ConnectionQuickPickItem | QuickPickItem> };
};
Expand Down
9 changes: 7 additions & 2 deletions src/platform/common/utils/multiStepInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export interface IQuickPickParameters<T extends QuickPickItem> {
supportBackInFirstStep?: boolean;
onDidTriggerItemButton?(e: QuickPickItemButtonEvent<T>): void;
onDidChangeItems?: Event<T[]>;
/**
* Whether to close the quick pick when the user clicks outside the quickpick.
*/
ignoreFocusOut?: boolean;
}

// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down Expand Up @@ -141,7 +145,8 @@ export class MultiStepInput<S> implements IMultiStepInput<S> {
onDidTriggerItemButton,
onDidTriggerButton,
supportBackInFirstStep,
onDidChangeItems
onDidChangeItems,
ignoreFocusOut
}: P): { quickPick: QuickPick<T>; selection: Promise<MultiStepInputQuickPicResponseType<T, P>> } {
const disposables: Disposable[] = [];
const deferred = createDeferred<MultiStepInputQuickPicResponseType<T, P>>();
Expand All @@ -150,7 +155,7 @@ export class MultiStepInput<S> implements IMultiStepInput<S> {
input.step = step;
input.totalSteps = totalSteps;
input.placeholder = placeholder;
input.ignoreFocusOut = true;
input.ignoreFocusOut = ignoreFocusOut ?? true;
input.items = items;
if (stopBusy) {
input.busy = startBusy ?? false;
Expand Down