Merge pull request #209052 from microsoft/merogge/accview

show acc view on escape of accessible view accessibility help
This commit is contained in:
Megan Rogge 2024-03-28 13:49:35 -07:00 committed by GitHub
commit 31fa87c61f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -320,10 +320,10 @@ export class AccessibleView extends Disposable {
if (position) {
// Context view takes time to show up, so we need to wait for it to show up before we can set the position
setTimeout(() => {
queueMicrotask(() => {
this._editorWidget.revealLine(position.lineNumber);
this._editorWidget.setSelection({ startLineNumber: position.lineNumber, startColumn: position.column, endLineNumber: position.lineNumber, endColumn: position.column });
}, 10);
});
}
if (symbol && this._currentProvider) {
@ -672,13 +672,17 @@ export class AccessibleView extends Disposable {
const accessibleViewHelpProvider: IAccessibleContentProvider = {
id: lastProvider.id,
provideContent: () => lastProvider.options.customHelp ? lastProvider?.options.customHelp() : this._getAccessibleViewHelpDialogContent(this._goToSymbolsSupported()),
onClose: () => this.show(lastProvider),
onClose: () => {
this._contextViewService.hideContextView();
// HACK: Delay to allow the context view to hide #207638
queueMicrotask(() => this.show(lastProvider));
},
options: { type: AccessibleViewType.Help },
verbositySettingKey: lastProvider.verbositySettingKey
};
this._contextViewService.hideContextView();
// HACK: Delay to allow the context view to hide #186514
setTimeout(() => this.show(accessibleViewHelpProvider, undefined, true), 100);
queueMicrotask(() => this.show(accessibleViewHelpProvider, undefined, true));
}
private _getAccessibleViewHelpDialogContent(providerHasSymbols?: boolean): string {