diff options
Diffstat (limited to 'ui/webui')
-rw-r--r-- | ui/webui/resources/js/cr/ui/dialogs.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/webui/resources/js/cr/ui/dialogs.js b/ui/webui/resources/js/cr/ui/dialogs.js index 9d2f70e..e6fd5ec 100644 --- a/ui/webui/resources/js/cr/ui/dialogs.js +++ b/ui/webui/resources/js/cr/ui/dialogs.js @@ -274,8 +274,10 @@ cr.define('cr.ui.dialogs', function() { }; PromptDialog.prototype.onKeyDown_ = function(event) { - if (event.keyCode == 13) // Enter + if (event.keyCode == 13) { // Enter this.onOkClick_(event); + event.preventDefault(); + } }; PromptDialog.prototype.show = function(message, defaultValue, onOk, onCancel, |