diff options
-rw-r--r-- | ui/webui/resources/js/cr/ui/dialogs.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/webui/resources/js/cr/ui/dialogs.js b/ui/webui/resources/js/cr/ui/dialogs.js index e6fd5ec..a871f7b 100644 --- a/ui/webui/resources/js/cr/ui/dialogs.js +++ b/ui/webui/resources/js/cr/ui/dialogs.js @@ -93,6 +93,9 @@ cr.define('cr.ui.dialogs', function() { // Handle Escape. if (event.keyCode == 27 && !this.cancelButton_.disabled) { this.onCancelClick_(event); + event.stopPropagation(); + // Prevent the event from being handled by the container of the dialog. + // e.g. Prevent the parent container from closing at the same time. event.preventDefault(); } }; |