Fix exception when moving from terminal editor to view

This commit is contained in:
Daniel Imms
2021-06-16 05:00:34 -07:00
parent c551cf89b7
commit eafba8ce2e
@@ -647,7 +647,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
// The container changed, reattach
this._container?.removeChild(this._wrapperElement);
const wrapperElement = this._wrapperElement;
this.detachFromElement();
this._wrapperElement = wrapperElement;
this._container = container;
this._container.appendChild(this._wrapperElement);
setTimeout(() => this._initDragAndDrop(container));