Use KeyCode.ENTER instead of 13
This commit is contained in:
parent
952651c685
commit
47bf5401fa
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ import React from 'react';
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
import KeyCode from '../../../KeyCode';
|
||||||
|
|
||||||
// The amount of time to wait for further changes to the input username before
|
// The amount of time to wait for further changes to the input username before
|
||||||
// sending a request to the server
|
// sending a request to the server
|
||||||
|
@ -92,7 +93,7 @@ export default React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onKeyUp: function(ev) {
|
onKeyUp: function(ev) {
|
||||||
if (ev.keyCode === 13) {
|
if (ev.keyCode === KeyCode.ENTER) {
|
||||||
this.onSubmit();
|
this.onSubmit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue