Stop using KeyboardEvent.keyCode as it is deprecated
This commit is contained in:
parent
3ec60b1692
commit
d28a892bb0
16 changed files with 95 additions and 111 deletions
|
@ -20,7 +20,7 @@ import PropTypes from 'prop-types';
|
|||
import createReactClass from 'create-react-class';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import dis from '../../../dispatcher';
|
||||
import { KeyCode } from '../../../Keyboard';
|
||||
import {Key} from '../../../Keyboard';
|
||||
|
||||
|
||||
module.exports = createReactClass({
|
||||
|
@ -52,8 +52,8 @@ module.exports = createReactClass({
|
|||
},
|
||||
|
||||
_onKeyDown: function(ev) {
|
||||
switch (ev.keyCode) {
|
||||
case KeyCode.ESCAPE:
|
||||
switch (ev.key) {
|
||||
case Key.ESCAPE:
|
||||
this.props.onCancelClick();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue