File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
src/vs/workbench/contrib/terminal/browser Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ class SplitPaneContainer extends Disposable {
142
142
if ( index !== null ) {
143
143
this . _children . splice ( index , 1 ) ;
144
144
this . _splitView . removeView ( index , Sizing . Distribute ) ;
145
+ instance . detachFromElement ( ) ;
145
146
}
146
147
}
147
148
Original file line number Diff line number Diff line change @@ -651,14 +651,10 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
651
651
}
652
652
653
653
detachFromElement ( ) : void {
654
- this . _detachWrapperElement ( ) ;
655
- this . _wrapperElement = undefined ;
654
+ this . _wrapperElement ?. remove ( ) ;
656
655
this . _container = undefined ;
657
656
}
658
657
659
- private _detachWrapperElement ( ) {
660
- this . _wrapperElement ?. parentNode ?. removeChild ( this . _wrapperElement ) ;
661
- }
662
658
663
659
attachToElement ( container : HTMLElement ) : Promise < void > | void {
664
660
// The container did not change, do nothing
@@ -679,7 +675,6 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
679
675
}
680
676
681
677
// The container changed, reattach
682
- this . _detachWrapperElement ( ) ;
683
678
this . _container = container ;
684
679
this . _container . appendChild ( this . _wrapperElement ) ;
685
680
setTimeout ( ( ) => this . _initDragAndDrop ( container ) ) ;
You can’t perform that action at this time.
0 commit comments