Skip to content

Commit 12dbb64

Browse files
Fix term focus on clicking header
1 parent 4dcf46a commit 12dbb64

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/containers/hyper.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,13 @@ class Hyper extends React.PureComponent<HyperProps> {
8585

8686
onTermsRef = (terms: Terms) => {
8787
this.terms = terms;
88-
window.focusActiveTerm = this.handleFocusActive;
88+
window.focusActiveTerm = (uid?: string) => {
89+
if (uid) {
90+
this.handleFocusActive(uid);
91+
} else {
92+
this.terms.getActiveTerm().focus();
93+
}
94+
};
8995
};
9096

9197
componentWillUnmount() {

0 commit comments

Comments
 (0)