diff --git a/lib/components/header.js b/lib/components/header.js index 5d4675e1..67b0bcc6 100644 --- a/lib/components/header.js +++ b/lib/components/header.js @@ -27,11 +27,12 @@ export default class Header extends React.PureComponent { this.props.onChangeTab(active); } - handleHeaderMouseDown(ev) { + handleHeaderMouseDown() { // the hack of all hacks, this prevents the term // iframe from losing focus, for example, when // the user drags the nav around - ev.preventDefault(); + // Fixed by calling window.focusActiveTerm(), thus we can support drag tab + // ev.preventDefault(); // persist start positions of a potential drag motion // to differentiate dragging from clicking @@ -111,6 +112,7 @@ export default class Header extends React.PureComponent {
window.focusActiveTerm()} onDoubleClick={this.handleMaximizeClick} > {!isMac && ( diff --git a/lib/containers/hyper.js b/lib/containers/hyper.js index a49be763..ebea39ad 100644 --- a/lib/containers/hyper.js +++ b/lib/containers/hyper.js @@ -87,6 +87,7 @@ class Hyper extends React.PureComponent { onTermsRef(terms) { this.terms = terms; + window.focusActiveTerm = this.handleFocusActive; } componentDidUpdate(prev) {