chat: toggle input out of code mode after sending
Closes Code input would stick after sending a code message, so we
now toggle out of it if we were in it, on enter.
@@ -319,8 +319,12 @@ export class ChatInput extends Component {
extraKeys: {
Tab: cm =>
this.patpAutocomplete(cm.getValue(), true),
- 'Enter': cm =>
- this.messageSubmit(),
+ 'Enter': () => {
+ this.messageSubmit();
+ if (this.state.code) {
+ this.toggleCode();
+ }
+ },
'Shift-3': cm =>
cm.getValue().length === 0
? this.toggleCode()
