diff --git a/src/app/ui/modaldialog.js b/src/app/ui/modaldialog.js index d36944cb0f..6cee053951 100644 --- a/src/app/ui/modaldialog.js +++ b/src/app/ui/modaldialog.js @@ -40,13 +40,11 @@ module.exports = (title, content, ok, cancel) => { } function modalKeyEvent (e) { - e.preventDefault() if (e.keyCode === 27) { cancelListener() } else if (e.keyCode === 13) { + e.preventDefault() okListener() - } else { - // Do nothing } } @@ -74,6 +72,7 @@ module.exports = (title, content, ok, cancel) => { function html () { return yo`