bug: properly render the terminal when open() is called again

This commit is contained in:
An Phi
2024-12-18 01:26:47 -05:00
committed by GitHub
parent 41e8ae3959
commit 9f9bb3c11c
+1 -1
View File
@@ -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;