Set renderer after screen element is attached to dom
This commit is contained in:
@@ -517,11 +517,6 @@ export class Terminal extends CoreTerminal implements ITerminal {
|
|||||||
this.register(this._renderService.onRenderedViewportChange(e => this._onRender.fire(e)));
|
this.register(this._renderService.onRenderedViewportChange(e => this._onRender.fire(e)));
|
||||||
this.onResize(e => this._renderService!.resize(e.cols, e.rows));
|
this.onResize(e => this._renderService!.resize(e.cols, e.rows));
|
||||||
|
|
||||||
this._onWillOpen.fire(this.element);
|
|
||||||
if (!this._renderService.hasRenderer()) {
|
|
||||||
this._renderService.setRenderer(this._createRenderer());
|
|
||||||
}
|
|
||||||
|
|
||||||
this._compositionView = document.createElement('div');
|
this._compositionView = document.createElement('div');
|
||||||
this._compositionView.classList.add('composition-view');
|
this._compositionView.classList.add('composition-view');
|
||||||
this._compositionHelper = this._instantiationService.createInstance(CompositionHelper, this.textarea, this._compositionView);
|
this._compositionHelper = this._instantiationService.createInstance(CompositionHelper, this.textarea, this._compositionView);
|
||||||
@@ -530,6 +525,11 @@ export class Terminal extends CoreTerminal implements ITerminal {
|
|||||||
// Performance: Add viewport and helper elements from the fragment
|
// Performance: Add viewport and helper elements from the fragment
|
||||||
this.element.appendChild(fragment);
|
this.element.appendChild(fragment);
|
||||||
|
|
||||||
|
this._onWillOpen.fire(this.element);
|
||||||
|
if (!this._renderService.hasRenderer()) {
|
||||||
|
this._renderService.setRenderer(this._createRenderer());
|
||||||
|
}
|
||||||
|
|
||||||
this._mouseService = this._instantiationService.createInstance(MouseService);
|
this._mouseService = this._instantiationService.createInstance(MouseService);
|
||||||
this._instantiationService.setService(IMouseService, this._mouseService);
|
this._instantiationService.setService(IMouseService, this._mouseService);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user