@@ -17,10 +17,9 @@ class Term extends Component {
1717 this . xt . onArrow = props . onArrow ;
1818 // this.xt.focus = props.onSelect.bind(null, props.uid);
1919 }
20-
2120
2221 onKey ( key , ev ) {
23- if ( isAccelerator ( ev ) ) {
22+ if ( isAccelerator ( ev ) ) {
2423 return false ;
2524 }
2625 rpc . emit ( 'data' , { uid : this . uid , data : key } ) ;
@@ -43,13 +42,12 @@ class Term extends Component {
4342 this . xt . writeln ( 'Welcome to xterm.js' ) ;
4443 this . xt . writeln ( 'Just type some keys in the prompt below.' ) ;
4544 this . xt . writeln ( '' ) ;
46- this . xt . attachCustomKeydownHandler ( this . onKey ) ;
4745 this . xt . on ( 'key' , this . onKey ) ;
48- this . xt . attachCustomKeydownHandler ( function ( e ) {
49- if ( isAccelerator ( e ) ) {
46+ this . xt . attachCustomKeydownHandler ( e => {
47+ if ( isAccelerator ( e ) ) {
5048 return false ;
5149 }
52- } )
50+ } ) ;
5351 }
5452
5553 componentDidMount ( ) {
@@ -59,21 +57,21 @@ class Term extends Component {
5957 window . addEventListener ( 'resize' , this . _SizeListener ) ;
6058 }
6159
62- componentWillReceiveProps ( next ) {
63- // if (next.activeTerm) {
64- // this.focus();
65- // this.xt.textarea.focus();
66- // }
67- // this._SizeListener();
68- }
60+ // componentWillReceiveProps(next) {
61+ // // if (next.activeTerm) {
62+ // // this.focus();
63+ // // this.xt.textarea.focus();
64+ // // }
65+ // // this._SizeListener();
66+ // }
6967
7068 template ( css ) {
7169 const { activeTerm} = this . props ;
7270 return ( < div
73- ref = { c => {
74- this . terminal = c ;
75- }
71+ ref = { t => {
72+ this . terminal = t ;
7673 }
74+ }
7775 className = { css ( 'terminal' , activeTerm && 'activeTerm' ) }
7876 /> ) ;
7977 }
0 commit comments