chat: autofocus input on desktop

This commit is contained in:
Matilde Park 2020-04-28 19:46:10 -04:00
parent 3196179fbd
commit 5487e48ca2

View File

@ -340,8 +340,13 @@ export class ChatInput extends Component {
<CodeEditor
options={options}
editorDidMount={(editor) => {
this.editor = editor;
}}
this.editor = editor;
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(
navigator.userAgent
)) {
editor.focus();
}
}}
onChange={(e, d, v) => this.messageChange(e, d, v)}
/>
</div>