fix up Start Chat behaviour as per Amandine's feedback

This commit is contained in:
Matthew Hodgson 2016-01-21 00:16:10 +00:00
parent 35c141cda9
commit deca90d0a7
5 changed files with 23 additions and 12 deletions

View file

@ -457,6 +457,15 @@ module.exports = React.createClass({
}
this._updateTabCompleteList(this.state.room);
// XXX: EVIL HACK to autofocus inviting on empty rooms.
// We use the setTimeout to avoid racing with focus_composer.
if (this.state.room && this.state.room.getJoinedMembers().length == 1) {
var inviteBox = document.getElementById("mx_SearchableEntityList_query");
setTimeout(function() {
inviteBox.focus();
}, 50);
}
},
_updateTabCompleteList: function(room) {