Merge pull request #3736 from matrix-org/t3chguy/stop_using_deprecated_keyCode

Stop using KeyboardEvent.keyCode as it is deprecated
This commit is contained in:
Michael Telatynski
2019-12-17 09:55:13 +00:00
committed by GitHub
16 changed files with 100 additions and 114 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();