diff options
Diffstat (limited to 'src/components/settings/SettingsLayout.jsx')
-rw-r--r-- | src/components/settings/SettingsLayout.jsx | 4 |
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'; | |||
8 | import ErrorBoundary from '../util/ErrorBoundary'; | 8 | import ErrorBoundary from '../util/ErrorBoundary'; |
9 | import Appear from '../ui/effects/Appear'; | 9 | import Appear from '../ui/effects/Appear'; |
10 | import Icon from '../ui/icon'; | 10 | import Icon from '../ui/icon'; |
11 | import { isEscKeyPress } from '../../jsUtils'; | ||
11 | 12 | ||
12 | const messages = defineMessages({ | 13 | const 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 | } |