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:
commit
3a8ab6ec2b
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue