From 7be41e1e2821f02cf9f58aeb96be11170db54e25 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 16 Dec 2017 10:06:02 -0800 Subject: [PATCH] Use public API to remove xterm listeners (#2543) --- lib/components/term.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/term.js b/lib/components/term.js index 583c5377..f1ab8ee4 100644 --- a/lib/components/term.js +++ b/lib/components/term.js @@ -217,7 +217,7 @@ export default class Term extends PureComponent { // instead of invoking `destroy`, since it will make the // term insta un-attachable in the future (which we need // to do in case of splitting, see `componentDidMount` - this.term._events = {}; + ['title', 'focus', 'data', 'resize'].forEach(type => this.term.removeAllListeners(type)); window.removeEventListener('resize', this.onWindowResize, { passive: true