focus main composer after cancel or saving edit

pull/21833/head
Bruno Windels 2019-05-27 16:26:21 +02:00
parent e193522db1
commit 25e2c747ed
1 changed files with 2 additions and 0 deletions

View File

@ -155,6 +155,7 @@ export default class MessageEditor extends React.Component {
_cancelEdit = () => { _cancelEdit = () => {
dis.dispatch({action: "edit_event", event: null}); dis.dispatch({action: "edit_event", event: null});
dis.dispatch({action: 'focus_composer'});
} }
_sendEdit = () => { _sendEdit = () => {
@ -185,6 +186,7 @@ export default class MessageEditor extends React.Component {
this.context.matrixClient.sendMessage(roomId, content); this.context.matrixClient.sendMessage(roomId, content);
dis.dispatch({action: "edit_event", event: null}); dis.dispatch({action: "edit_event", event: null});
dis.dispatch({action: 'focus_composer'});
} }
_onAutoCompleteConfirm = (completion) => { _onAutoCompleteConfirm = (completion) => {