File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
139
139
140
140
[ this . _rectangleRenderer . value , this . _glyphRenderer . value ] = this . _initializeWebGLState ( ) ;
141
141
142
- this . _isAttached = this . _coreBrowserService . window . document . body . contains ( this . _core . screenElement ! ) ;
142
+ this . _isAttached = this . _core . screenElement ! . isConnected ;
143
143
144
144
this . _register ( toDisposable ( ( ) => {
145
145
for ( const l of this . _renderLayers ) {
@@ -322,7 +322,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
322
322
323
323
public renderRows ( start : number , end : number ) : void {
324
324
if ( ! this . _isAttached ) {
325
- if ( this . _coreBrowserService . window . document . body . contains ( this . _core . screenElement ! ) && this . _charSizeService . width && this . _charSizeService . height ) {
325
+ if ( this . _core . screenElement ?. isConnected && this . _charSizeService . width && this . _charSizeService . height ) {
326
326
this . _updateDimensions ( ) ;
327
327
this . _refreshCharAtlas ( ) ;
328
328
this . _isAttached = true ;
You can’t perform that action at this time.
0 commit comments