Use public API to remove xterm listeners (#2543)

This commit is contained in:
Daniel Imms 2017-12-16 10:06:02 -08:00 committed by CHaBou
parent 30964b6571
commit 7be41e1e28

View file

@ -217,7 +217,7 @@ export default class Term extends PureComponent {
// instead of invoking `destroy`, since it will make the // instead of invoking `destroy`, since it will make the
// term insta un-attachable in the future (which we need // term insta un-attachable in the future (which we need
// to do in case of splitting, see `componentDidMount` // 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, { window.removeEventListener('resize', this.onWindowResize, {
passive: true passive: true