mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -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) => {
|
||||
this.terms = terms;
|
||||
window.focusActiveTerm = this.handleFocusActive;
|
||||
window.focusActiveTerm = (uid?: string) => {
|
||||
if (uid) {
|
||||
this.handleFocusActive(uid);
|
||||
} else {
|
||||
this.terms.getActiveTerm().focus();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue