mirror of https://github.com/vector-im/riot-web
Allow pressing Enter to submit setMxId
parent
9536e1ef36
commit
952651c685
|
@ -91,6 +91,12 @@ export default React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onKeyUp: function(ev) {
|
||||||
|
if (ev.keyCode === 13) {
|
||||||
|
this.onSubmit();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onSubmit: function(ev) {
|
onSubmit: function(ev) {
|
||||||
this.setState({
|
this.setState({
|
||||||
doingUIAuth: true,
|
doingUIAuth: true,
|
||||||
|
@ -233,7 +239,10 @@ export default React.createClass({
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
<div className="mx_SetMxIdDialog_input_group">
|
<div className="mx_SetMxIdDialog_input_group">
|
||||||
<input type="text" ref="input_value" value={this.state.username}
|
<input type="text" ref="input_value" value={this.state.username}
|
||||||
autoFocus={true} onChange={this.onValueChange} size="30"
|
autoFocus={true}
|
||||||
|
onChange={this.onValueChange}
|
||||||
|
onKeyUp={this.onKeyUp}
|
||||||
|
size="30"
|
||||||
className={inputClasses}
|
className={inputClasses}
|
||||||
/>
|
/>
|
||||||
{ usernameBusyIndicator }
|
{ usernameBusyIndicator }
|
||||||
|
|
Loading…
Reference in New Issue