Index: ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js |
diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js |
index 1f66df481d6c26cd2418ceac0ed1083c9db4330f..4556ef94e588dcdbfc16cf74e764d83b515930eb 100644 |
--- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js |
+++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js |
@@ -142,6 +142,16 @@ Polymer({ |
HTMLDialogElement.prototype.close.call(this, 'success'); |
}, |
+ /** |
+ * @private |
+ * @param {Event} e |
+ */ |
+ stopPropagation_: function(e) { |
dpapad
2017/05/15 23:20:56
Nit: Since this handler is only attached to the 'x
tommycli
2017/05/15 23:27:00
Done.
|
+ // Because the dialog may have a default Enter key handler, prevent |
+ // keypress events from bubbling up from this element. |
+ e.stopPropagation(); |
+ }, |
+ |
/** @return {!PaperIconButtonElement} */ |
getCloseButton: function() { |
return this.$.close; |