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,6 +20,7 @@ import PropTypes from 'prop-types';
|
|||
import sdk from '../../../index';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import dis from '../../../dispatcher';
|
||||
import {Key} from "../../../Keyboard";
|
||||
|
||||
export default class IntegrationManager extends React.Component {
|
||||
static propTypes = {
|
||||
|
@ -52,7 +53,7 @@ export default class IntegrationManager extends React.Component {
|
|||
}
|
||||
|
||||
onKeyDown = (ev) => {
|
||||
if (ev.keyCode === 27) { // escape
|
||||
if (ev.key === Key.ESCAPE) {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.props.onFinished();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue