Skip to content

Commit

Permalink
Merge pull request xtermjs#5253 from akphi/patch-1
Browse files Browse the repository at this point in the history
bug: properly render the terminal when open() is called again
  • Loading branch information
Tyriar authored Jan 6, 2025
2 parents af4208d + 62656b8 commit 601efc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/CoreBrowserTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 601efc3

Please sign in to comment.