|
|
@ -94,13 +94,12 @@ class ConsoleComponent extends Component { |
|
|
|
if (prevProps.mode !== 'command' && this.props.mode === 'command') { |
|
|
|
if (prevProps.mode !== 'command' && this.props.mode === 'command') { |
|
|
|
this.context.store.dispatch( |
|
|
|
this.context.store.dispatch( |
|
|
|
consoleActions.getCompletions(this.props.consoleText)); |
|
|
|
consoleActions.getCompletions(this.props.consoleText)); |
|
|
|
this.input.focus(); |
|
|
|
this.focus(); |
|
|
|
} else if (prevProps.mode !== 'find' && this.props.mode === 'find') { |
|
|
|
} else if (prevProps.mode !== 'find' && this.props.mode === 'find') { |
|
|
|
this.input.focus(); |
|
|
|
this.focus(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
render() { |
|
|
|
switch (this.props.mode) { |
|
|
|
switch (this.props.mode) { |
|
|
|
case 'command': |
|
|
|
case 'command': |
|
|
@ -123,6 +122,11 @@ class ConsoleComponent extends Component { |
|
|
|
</Message>; |
|
|
|
</Message>; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
focus() { |
|
|
|
|
|
|
|
window.focus(); |
|
|
|
|
|
|
|
this.input.focus(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = state => state; |
|
|
|
const mapStateToProps = state => state; |
|
|
|