mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 21:58:39 -09:00
Fix term focus on clicking header
This commit is contained in:
parent
4dcf46a135
commit
734bae2938
1 changed files with 7 additions and 1 deletions
|
|
@ -85,7 +85,13 @@ class Hyper extends React.PureComponent<HyperProps> {
|
||||||
|
|
||||||
onTermsRef = (terms: Terms) => {
|
onTermsRef = (terms: Terms) => {
|
||||||
this.terms = terms;
|
this.terms = terms;
|
||||||
window.focusActiveTerm = this.handleFocusActive;
|
window.focusActiveTerm = (uid?: string) => {
|
||||||
|
if (uid) {
|
||||||
|
this.handleFocusActive(uid);
|
||||||
|
} else {
|
||||||
|
this.terms.getActiveTerm().focus();
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue