diff --git a/lib/components/term.tsx b/lib/components/term.tsx index 16846184..80fd48ea 100644 --- a/lib/components/term.tsx +++ b/lib/components/term.tsx @@ -284,9 +284,9 @@ export default class Term extends React.PureComponent { this.term.write(data); } - focus() { + focus = () => { this.term.focus(); - } + }; clear() { this.term.clear(); @@ -431,6 +431,7 @@ export default class Term extends React.PureComponent { className={`term_fit ${this.props.isTermActive ? 'term_active' : ''}`} style={{padding: this.props.padding}} onMouseUp={this.onMouseUp} + onClick={this.focus} > {this.props.customChildrenBefore}