fix mouse event listener change before term attached

This commit is contained in:
Sebastian Pfitzner
2019-01-21 11:09:00 +01:00
parent 50abb43e9c
commit 8bdb606fd1
2 changed files with 12 additions and 2 deletions
+6
View File
@@ -733,6 +733,12 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
this.register(addDisposableDomListener(this._viewportElement, 'scroll', () => this.selectionManager.refresh()));
this.mouseHelper = new MouseHelper(this.renderer);
// apply mouse event classes set by escape codes before terminal was attached
if (this.mouseEvents) {
this.element.classList.add('enable-mouse-events');
} else {
this.element.classList.remove('enable-mouse-events');
}
if (this.options.screenReaderMode) {
// Note that this must be done *after* the renderer is created in order to