From 9f9bb3c11c0d6d88c4d9d16ce70e9e1f3be73038 Mon Sep 17 00:00:00 2001 From: An Phi Date: Wed, 18 Dec 2024 01:26:47 -0500 Subject: [PATCH] bug: properly render the terminal when open() is called again --- src/browser/CoreBrowserTerminal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/CoreBrowserTerminal.ts b/src/browser/CoreBrowserTerminal.ts index 2e15b5f379..33ee94bc84 100644 --- a/src/browser/CoreBrowserTerminal.ts +++ b/src/browser/CoreBrowserTerminal.ts @@ -400,7 +400,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal { } // If the terminal is already opened - if (this.element?.ownerDocument.defaultView && this._coreBrowserService) { + if (this.element?.ownerDocument.defaultView && this._coreBrowserService && this.element?.isConnected) { // Adjust the window if needed if (this.element.ownerDocument.defaultView !== this._coreBrowserService.window) { this._coreBrowserService.window = this.element.ownerDocument.defaultView;