diff --git a/web/pgadmin/static/jsx/history/query_history.jsx b/web/pgadmin/static/jsx/history/query_history.jsx index a276e5398..8efe08bd9 100644 --- a/web/pgadmin/static/jsx/history/query_history.jsx +++ b/web/pgadmin/static/jsx/history/query_history.jsx @@ -57,13 +57,13 @@ export default class QueryHistory extends React.Component { refocus() { if (this.state.history.length > 0) { - this.retrieveSelectedQuery().parentElement.focus(); + this.retrieveQueryListPane().focus(); } } - retrieveSelectedQuery() { + retrieveQueryListPane() { return ReactDOM.findDOMNode(this) - .getElementsByClassName('selected')[0]; + .getElementsByClassName('query-history')[0]; } getCurrentHistoryDetail() { @@ -172,13 +172,14 @@ export default class QueryHistory extends React.Component {
+ className="query-history" + onKeyDown={this.navigateUpAndDown} + tabIndex='0'>