You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
fix new 3pid invite UI
This commit is contained in:
@ -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>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user