mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28: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);
|
this.term.write(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
focus() {
|
focus = () => {
|
||||||
this.term.focus();
|
this.term.focus();
|
||||||
}
|
};
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
this.term.clear();
|
this.term.clear();
|
||||||
|
|
@ -431,6 +431,7 @@ export default class Term extends React.PureComponent<TermProps> {
|
||||||
className={`term_fit ${this.props.isTermActive ? 'term_active' : ''}`}
|
className={`term_fit ${this.props.isTermActive ? 'term_active' : ''}`}
|
||||||
style={{padding: this.props.padding}}
|
style={{padding: this.props.padding}}
|
||||||
onMouseUp={this.onMouseUp}
|
onMouseUp={this.onMouseUp}
|
||||||
|
onClick={this.focus}
|
||||||
>
|
>
|
||||||
{this.props.customChildrenBefore}
|
{this.props.customChildrenBefore}
|
||||||
<div ref={this.onTermWrapperRef} className="term_fit term_wrapper" />
|
<div ref={this.onTermWrapperRef} className="term_fit term_wrapper" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue