Skip to content

Commit be62428

Browse files
authored
Merge pull request microsoft#186568 from microsoft/merogge/close-help-2
prevent help menu from being read in full when escape is used
2 parents 68dc220 + 89f9fb8 commit be62428

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/vs/workbench/contrib/accessibility/browser/accessibleView.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ class AccessibleView extends Disposable {
9696
getAnchor: () => this._editorContainer,
9797
render: (container) => {
9898
return this._render(provider, container);
99-
},
100-
onHide: () => {
101-
provider.onClose();
102-
this._keyListener?.dispose();
10399
}
104100
};
105101
this._contextViewService.showContextView(delegate);
@@ -128,6 +124,9 @@ class AccessibleView extends Disposable {
128124
this._keyListener = this._register(this._editorWidget.onKeyUp((e) => {
129125
if (e.keyCode === KeyCode.Escape) {
130126
this._contextViewService.hideContextView();
127+
// Delay to allow the context view to hide #186514
128+
setTimeout(() => provider.onClose(), 100);
129+
this._keyListener?.dispose();
131130
} else if (e.keyCode === KeyCode.KeyD && this._configurationService.getValue(settingKey)) {
132131
this._configurationService.updateValue(settingKey, false);
133132
} else if (e.keyCode === KeyCode.KeyH && provider.options.readMoreUrl) {
@@ -143,7 +142,7 @@ class AccessibleView extends Disposable {
143142
this._editorWidget.updateOptions({ ariaLabel: provider.options.ariaLabel });
144143
this._editorWidget.focus();
145144
});
146-
return toDisposable(() => provider.onClose());
145+
return toDisposable(() => { });
147146
}
148147

149148
private _layout(): void {

0 commit comments

Comments
 (0)