Skip to content

Commit

Permalink
fix accessible view kb quickpick not showing (#213745)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge authored May 29, 2024
1 parent e82ceeb commit 3e4580a
Showing 1 changed file with 8 additions and 3 deletions.
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

0 comments on commit 3e4580a

Please sign in to comment.