aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/SettingsLayout.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/settings/SettingsLayout.jsx')
-rw-r--r--src/components/settings/SettingsLayout.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/settings/SettingsLayout.jsx b/src/components/settings/SettingsLayout.jsx
index dea4bb387..989c428f2 100644
--- a/src/components/settings/SettingsLayout.jsx
+++ b/src/components/settings/SettingsLayout.jsx
@@ -8,6 +8,7 @@ import { Outlet } from 'react-router-dom';
8import ErrorBoundary from '../util/ErrorBoundary'; 8import ErrorBoundary from '../util/ErrorBoundary';
9import Appear from '../ui/effects/Appear'; 9import Appear from '../ui/effects/Appear';
10import Icon from '../ui/icon'; 10import Icon from '../ui/icon';
11import { isEscKeyPress } from '../../jsUtils';
11 12
12const messages = defineMessages({ 13const messages = defineMessages({
13 closeSettings: { 14 closeSettings: {
@@ -36,8 +37,7 @@ class SettingsLayout extends Component {
36 } 37 }
37 38
38 handleKeyDown(e) { 39 handleKeyDown(e) {
39 if (e.keyCode === 27) { 40 if (isEscKeyPress(e.keyCode)) {
40 // escape key
41 this.props.closeSettings(); 41 this.props.closeSettings();
42 } 42 }
43 } 43 }