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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-behaviors/iron-control-state-extracted.js

Issue 1336623003: [MD settings] updating polymer to 1.1.13 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed Polymer.IronCheckedElementBehavior name Created 5 years, 3 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/iron-behaviors/iron-control-state-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-behaviors/iron-control-state-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-behaviors/iron-control-state-extracted.js
index c00882f2f43ffc80c31f5bec89ece0af452ab38a..e5dc06b7d9910b2f0f74060f16a6408b741fb39e 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-behaviors/iron-control-state-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-behaviors/iron-control-state-extracted.js
@@ -51,8 +51,13 @@
},
_focusBlurHandler: function(event) {
- var target = event.path ? event.path[0] : event.target;
- if (target === this) {
+ // NOTE(cdata): if we are in ShadowDOM land, `event.target` will
+ // eventually become `this` due to retargeting; if we are not in
+ // ShadowDOM land, `event.target` will eventually become `this` due
+ // to the second conditional which fires a synthetic event (that is also
+ // handled). In either case, we can disregard `event.path`.
+
+ if (event.target === this) {
var focused = event.type === 'focus';
this._setFocused(focused);
} else if (!this.shadowRoot) {

Powered by Google App Engine
This is Rietveld 408576698