diff --git a/components/app.js b/components/app.js index ef35fde..e8f838c 100644 --- a/components/app.js +++ b/components/app.js @@ -290,8 +290,8 @@ export default class App extends Component { lastReadReceipt, }); - if (this.composer.current) { - this.composer.current.focus(); + if (this.buffer.current) { + this.buffer.current.focus(); } if (buf.messages.length == 0) { @@ -1275,7 +1275,7 @@ export default class App extends Component { scrollKey=${this.state.activeBuffer} onScrollTop=${this.handleBufferScrollTop} > -
+
<${Buffer} buffer=${activeBuffer} server=${activeServer} diff --git a/components/composer.js b/components/composer.js index 4528d43..9ae634e 100644 --- a/components/composer.js +++ b/components/composer.js @@ -58,12 +58,35 @@ export default class Composer extends Component { } handleWindowKeyDown(event) { - if (document.activeElement === document.body && event.key === "/" && !this.state.text) { - event.preventDefault(); - this.setState({ text: "/" }, () => { - this.focus(); - }); + // If an or