Set focus to server log control in System Console when loading panel (#4912)

remove import
This commit is contained in:
Carlos Tadeu Panato Junior
2017-01-06 14:55:07 +01:00
committed by Joram Wilander
parent 599869b3ca
commit c96a36e9b3

View File

@@ -24,12 +24,14 @@ export default class Logs extends React.Component {
componentDidMount() {
AdminStore.addLogChangeListener(this.onLogListenerChange);
AsyncClient.getLogs();
this.refs.logPanel.focus();
}
componentDidUpdate() {
// Scroll Down to get the latest logs
var node = this.refs.logPanel;
node.scrollTop = node.scrollHeight;
node.focus();
}
componentWillUnmount() {
@@ -100,6 +102,7 @@ export default class Logs extends React.Component {
/>
</button>
<div
tabIndex='-1'
ref='logPanel'
className='log__panel'
>