about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/components/features/ui/components/modal_root.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/ui/components/modal_root.jsx b/app/assets/javascripts/components/features/ui/components/modal_root.jsx
index cfaa8a598..23057715c 100644
--- a/app/assets/javascripts/components/features/ui/components/modal_root.jsx
+++ b/app/assets/javascripts/components/features/ui/components/modal_root.jsx
@@ -22,7 +22,8 @@ class ModalRoot extends React.PureComponent {
   }
 
   handleKeyUp (e) {
-    if (e.key === 'Escape' && !!this.props.type) {
+    if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)
+         && !!this.props.type) {
       this.props.onClose();
     }
   }