mirror of https://github.com/vector-im/riot-web
don't lose focus after a / command
parent
e06763cd59
commit
4c3588d260
|
@ -745,9 +745,10 @@ export default class MessageComposerInput extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (cmd.promise) {
|
if (cmd.promise) {
|
||||||
cmd.promise.then(function() {
|
cmd.promise.then(()=>{
|
||||||
console.log("Command success.");
|
console.log("Command success.");
|
||||||
}, function(err) {
|
this.refs.editor.focus();
|
||||||
|
}, (err)=>{
|
||||||
console.error("Command failure: %s", err);
|
console.error("Command failure: %s", err);
|
||||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
Modal.createTrackedDialog('Server error', '', ErrorDialog, {
|
Modal.createTrackedDialog('Server error', '', ErrorDialog, {
|
||||||
|
|
Loading…
Reference in New Issue