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 {
139139
140140 [ this . _rectangleRenderer . value , this . _glyphRenderer . value ] = this . _initializeWebGLState ( ) ;
141141
142- this . _isAttached = this . _coreBrowserService . window . document . body . contains ( this . _core . screenElement ! ) ;
142+ this . _isAttached = this . _core . screenElement ! . isConnected ;
143143
144144 this . _register ( toDisposable ( ( ) => {
145145 for ( const l of this . _renderLayers ) {
@@ -322,7 +322,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
322322
323323 public renderRows ( start : number , end : number ) : void {
324324 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 ) {
326326 this . _updateDimensions ( ) ;
327327 this . _refreshCharAtlas ( ) ;
328328 this . _isAttached = true ;
You can’t perform that action at this time.
0 commit comments