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

fix accessible view kb quickpick not showing #213745

Merged
merged 2 commits into from
May 29, 2024
Merged
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
11 changes: 8 additions & 3 deletions src/vs/workbench/contrib/accessibility/browser/accessibleView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export class AccessibleView extends Disposable {
private _accessibleViewInCodeBlock: IContextKey<boolean>;
private _accessibleViewContainsCodeBlocks: IContextKey<boolean>;
private _codeBlocks?: ICodeBlock[];
private _inQuickPick: boolean = false;

get editorWidget() { return this._editorWidget; }
private _container: HTMLElement;
Expand Down Expand Up @@ -379,8 +380,9 @@ export class AccessibleView extends Disposable {
}

configureKeybindings(): void {
const items = this._currentProvider?.options?.configureKeybindingItems;
const provider = this._currentProvider;
this._inQuickPick = true;
const provider = this._updateLastProvider();
const items = provider?.options?.configureKeybindingItems;
if (!items) {
return;
}
Expand All @@ -402,6 +404,7 @@ export class AccessibleView extends Disposable {
this.show(provider);
}
quickPick.dispose();
this._inQuickPick = false;
});
}

Expand Down Expand Up @@ -568,7 +571,9 @@ export class AccessibleView extends Disposable {
this._updateToolbar(this._currentProvider.actions, provider.options.type);

const hide = (e?: KeyboardEvent | IKeyboardEvent): void => {
provider.onClose();
if (!this._inQuickPick) {
provider.onClose();
}
e?.stopPropagation();
this._contextViewService.hideContextView();
this._updateContextKeys(provider, false);
Expand Down
Loading