use queueMicrotask

This commit is contained in:
meganrogge 2024-03-28 13:06:29 -07:00
parent 61935116e2
commit 304835f369
No known key found for this signature in database
GPG key ID: AA74638D4878183D

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) {
@ -675,14 +675,14 @@ export class AccessibleView extends Disposable {
onClose: () => {
this._contextViewService.hideContextView();
// HACK: Delay to allow the context view to hide #207638
setTimeout(() => this.show(lastProvider), 100);
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 {