| Index: ui/webui/resources/js/cr/ui/overlay.js
|
| diff --git a/ui/webui/resources/js/cr/ui/overlay.js b/ui/webui/resources/js/cr/ui/overlay.js
|
| index 293ca20f2caa3175bd89deeff09b3748e3b05451..5c0acb2d3dd826d52e3f76e1a3de7b7127671043 100644
|
| --- a/ui/webui/resources/js/cr/ui/overlay.js
|
| +++ b/ui/webui/resources/js/cr/ui/overlay.js
|
| @@ -58,8 +58,13 @@ cr.define('cr.ui.overlay', function() {
|
| if (e.keyIdentifier == 'Enter' &&
|
| !forbiddenTagNames.test(document.activeElement.tagName)) {
|
| var button = getDefaultButton(overlay);
|
| - if (button)
|
| + if (button) {
|
| button.click();
|
| + // Executing the default button may result in focus moving to a
|
| + // different button. Calling preventDefault is necessary to not have
|
| + // that button execute as well.
|
| + e.preventDefault();
|
| + }
|
| }
|
| });
|
|
|
|
|