Use KeyCode.ENTER instead of 13

This commit is contained in:
Luke Barnard 2017-05-30 13:14:14 +01:00
parent 952651c685
commit 47bf5401fa

View file

@ -20,6 +20,7 @@ import React from 'react';
import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg';
import classnames from 'classnames';
import KeyCode from '../../../KeyCode';
// The amount of time to wait for further changes to the input username before
// sending a request to the server
@ -92,7 +93,7 @@ export default React.createClass({
},
onKeyUp: function(ev) {
if (ev.keyCode === 13) {
if (ev.keyCode === KeyCode.ENTER) {
this.onSubmit();
}
},