diff --git a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts index 71c232bfa47..fdeeda33c39 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts @@ -556,6 +556,7 @@ export class WorkspaceTrustEditor extends EditorPane { protected createEditor(parent: HTMLElement): void { this.rootElement = append(parent, $('.workspace-trust-editor', { tabindex: '0' })); + this.rootElement.style.display = 'none'; this.createHeaderElement(this.rootElement); @@ -587,6 +588,7 @@ export class WorkspaceTrustEditor extends EditorPane { await super.setInput(input, options, context, token); if (token.isCancellationRequested) { return; } + await this.workspaceTrustManagementService.workspaceTrustInitialized; this.registerListeners(); this.render(); } @@ -738,6 +740,7 @@ export class WorkspaceTrustEditor extends EditorPane { this.bodyScrollBar.getDomNode().style.height = `calc(100% - ${this.headerContainer.clientHeight}px)`; this.bodyScrollBar.scanDomNode(); + this.rootElement.style.display = ''; this.rendering = false; }