Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1647)

Unified Diff: third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js
index 18689a5f31f1c9e5e3446ab70d8d866b74455859..099e60760a1105e5e7a266d5a72cd544876bd6fb 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js
@@ -38,7 +38,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.
@@ -159,15 +159,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;
}

Powered by Google App Engine
This is Rietveld 408576698