mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Focus term when clicked on padding
This commit is contained in:
parent
bafa44845a
commit
f355e31a80
1 changed files with 3 additions and 2 deletions
|
|
@ -284,9 +284,9 @@ export default class Term extends React.PureComponent<TermProps> {
|
|||
this.term.write(data);
|
||||
}
|
||||
|
||||
focus() {
|
||||
focus = () => {
|
||||
this.term.focus();
|
||||
}
|
||||
};
|
||||
|
||||
clear() {
|
||||
this.term.clear();
|
||||
|
|
@ -431,6 +431,7 @@ export default class Term extends React.PureComponent<TermProps> {
|
|||
className={`term_fit ${this.props.isTermActive ? 'term_active' : ''}`}
|
||||
style={{padding: this.props.padding}}
|
||||
onMouseUp={this.onMouseUp}
|
||||
onClick={this.focus}
|
||||
>
|
||||
{this.props.customChildrenBefore}
|
||||
<div ref={this.onTermWrapperRef} className="term_fit term_wrapper" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue