Use Keyboard Key variables instead of hardcoded strings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
84e71297ef
commit
58317b1608
9 changed files with 51 additions and 30 deletions
|
@ -22,6 +22,7 @@ import SdkConfig from '../../../SdkConfig';
|
|||
import withValidation from '../elements/Validation';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||
import {Key} from "../../../Keyboard";
|
||||
|
||||
export default createReactClass({
|
||||
displayName: 'CreateRoomDialog',
|
||||
|
@ -74,7 +75,7 @@ export default createReactClass({
|
|||
},
|
||||
|
||||
_onKeyDown: function(event) {
|
||||
if (event.key === "Enter") {
|
||||
if (event.key === Key.ENTER) {
|
||||
this.onOk();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue