fix new 3pid invite UI
This commit is contained in:
parent
5379956b0d
commit
487f3c72dd
1 changed files with 15 additions and 3 deletions
|
@ -129,14 +129,26 @@ var SearchableEntityList = React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var inputBox;
|
var inputBox;
|
||||||
|
|
||||||
if (this.props.showInputBox) {
|
if (this.props.showInputBox) {
|
||||||
inputBox = (
|
inputBox = (
|
||||||
<form onSubmit={this.onQuerySubmit} autoComplete="off">
|
<form onSubmit={this.onQuerySubmit} autoComplete="off">
|
||||||
<input className="mx_SearchableEntityList_query" id="mx_SearchableEntityList_query" type="text"
|
<input className="mx_SearchableEntityList_query" id="mx_SearchableEntityList_query" type="text"
|
||||||
onChange={this.onQueryChanged} value={this.state.query}
|
onChange={this.onQueryChanged} value={this.state.query}
|
||||||
onFocus={ ()=>{ this.setState({ focused: true }) } }
|
onFocus={ ()=>{
|
||||||
onBlur={ ()=>{ this.setState({ focused: false }) } }
|
if (this._blurTimeout) {
|
||||||
|
clearTimeout(this.blurTimeout);
|
||||||
|
}
|
||||||
|
this.setState({ focused: true });
|
||||||
|
} }
|
||||||
|
onBlur={ ()=>{
|
||||||
|
// nasty setTimeout heuristic to avoid the 'invite by email' prompt disappearing
|
||||||
|
// due to the onBlur before we can click on it
|
||||||
|
this._blurTimeout = setTimeout(
|
||||||
|
()=>{ this.setState({ focused: false }) },
|
||||||
|
300
|
||||||
|
);
|
||||||
|
} }
|
||||||
placeholder={this.props.searchPlaceholderText} />
|
placeholder={this.props.searchPlaceholderText} />
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue