Skip to content

Commit

Permalink
Fixed bug where switching tab causes loss of focus on editor (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
synle committed Jan 31, 2022
1 parent 930d545 commit 08c6d76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/components/query.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ export default class Query extends Component {
}

componentDidUpdate() {
this.refs.queryBoxTextarea.editor.focus();

if (this.props.query.isExecuting && this.props.query.isDefaultSelect) {
this.refs.queryBoxTextarea.editor.focus();
window.scrollTo(0, 0);
}
}
Expand Down

0 comments on commit 08c6d76

Please sign in to comment.