Index: third_party/polymer/v1_0/components/paper-dialog-behavior/paper-dialog-behavior.html |
diff --git a/third_party/polymer/v1_0/components/paper-dialog-behavior/paper-dialog-behavior.html b/third_party/polymer/v1_0/components/paper-dialog-behavior/paper-dialog-behavior.html |
index 227fb4dbaef5274f510dfb5385d4d86b49f6c8ec..0afcb8b7f82da317e901295aa392c7f80d95fd3c 100644 |
--- a/third_party/polymer/v1_0/components/paper-dialog-behavior/paper-dialog-behavior.html |
+++ b/third_party/polymer/v1_0/components/paper-dialog-behavior/paper-dialog-behavior.html |
@@ -52,7 +52,7 @@ Custom property | Description | Default |
### Accessibility |
This element has `role="dialog"` by default. Depending on the context, it may be more appropriate |
-to override this attribute with `role="alertdialog"`. The header (a `<h2>` element) will |
+to override this attribute with `role="alertdialog"`. |
If `modal` is set, the element will set `aria-modal` and prevent the focus from exiting the element. |
It will also ensure that focus remains in the dialog. |
@@ -173,15 +173,17 @@ The `aria-labelledby` attribute will be set to the header element, if one exists |
_onDialogClick: function(event) { |
var target = event.target; |
- while (target !== this) { |
- if (target.hasAttribute('dialog-dismiss')) { |
- this._updateClosingReasonConfirmed(false); |
- this.close(); |
- break; |
- } else if (target.hasAttribute('dialog-confirm')) { |
- this._updateClosingReasonConfirmed(true); |
- this.close(); |
- break; |
+ while (target && target !== this) { |
+ if (target.hasAttribute) { |
+ if (target.hasAttribute('dialog-dismiss')) { |
+ this._updateClosingReasonConfirmed(false); |
+ this.close(); |
+ break; |
+ } else if (target.hasAttribute('dialog-confirm')) { |
+ this._updateClosingReasonConfirmed(true); |
+ this.close(); |
+ break; |
+ } |
} |
target = target.parentNode; |
} |