This commit is contained in:
parent
396d23b267
commit
be5173a8db
1 changed files with 9 additions and 4 deletions
|
@ -217,11 +217,8 @@ module.exports = React.createClass({
|
||||||
console.log(
|
console.log(
|
||||||
"Invite %s to %s - isEmail=%s", inputText, this.props.roomId, isEmailAddress
|
"Invite %s to %s - isEmail=%s", inputText, this.props.roomId, isEmailAddress
|
||||||
);
|
);
|
||||||
promise.done(function(res) {
|
promise.then(function(res) {
|
||||||
console.log("Invited %s", inputText);
|
console.log("Invited %s", inputText);
|
||||||
self.setState({
|
|
||||||
inviting: false
|
|
||||||
});
|
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err !== null) {
|
if (err !== null) {
|
||||||
console.error("Failed to invite: %s", JSON.stringify(err));
|
console.error("Failed to invite: %s", JSON.stringify(err));
|
||||||
|
@ -230,9 +227,17 @@ module.exports = React.createClass({
|
||||||
description: err.message
|
description: err.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}).finally(function() {
|
||||||
self.setState({
|
self.setState({
|
||||||
inviting: false
|
inviting: false
|
||||||
});
|
});
|
||||||
|
// XXX: hacky focus on the invite box
|
||||||
|
setTimeout(function() {
|
||||||
|
var inviteBox = document.getElementById("mx_SearchableEntityList_query");
|
||||||
|
if (inviteBox) {
|
||||||
|
inviteBox.focus();
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue