Index: third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js |
diff --git a/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js |
index 2b1042962acd87b1f0f94b9b95d8be99172e5ddb..2073573050772899a0257e41865b3f0d32d44af1 100644 |
--- a/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js |
+++ b/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js |
@@ -350,13 +350,8 @@ |
listeners: { |
'addon-attached': '_onAddonAttached', |
- 'focus': '_onFocus' |
}, |
- observers: [ |
- '_focusedControlStateChanged(focused)' |
- ], |
- |
keyBindings: { |
'shift+tab:keydown': '_onShiftTabDown' |
}, |
@@ -425,12 +420,17 @@ |
}, |
/** |
- * Forward focus to inputElement |
+ * Forward focus to inputElement. Overriden from IronControlState. |
*/ |
- _onFocus: function() { |
- if (!this._shiftTabPressed) { |
+ _focusBlurHandler: function(event) { |
+ if (this._shiftTabPressed) |
+ return; |
+ |
+ Polymer.IronControlState._focusBlurHandler.call(this, event); |
+ |
+ // Forward the focus to the nested input. |
+ if (this.focused) |
this._focusableElement.focus(); |
- } |
}, |
/** |
@@ -482,24 +482,6 @@ |
return placeholder || alwaysFloatLabel; |
}, |
- _focusedControlStateChanged: function(focused) { |
- // IronControlState stops the focus and blur events in order to redispatch them on the host |
- // element, but paper-input-container listens to those events. Since there are more |
- // pending work on focus/blur in IronControlState, I'm putting in this hack to get the |
- // input focus state working for now. |
- if (!this.$.container) { |
- this.$.container = Polymer.dom(this.root).querySelector('paper-input-container'); |
- if (!this.$.container) { |
- return; |
- } |
- } |
- if (focused) { |
- this.$.container._onFocus(); |
- } else { |
- this.$.container._onBlur(); |
- } |
- }, |
- |
_updateAriaLabelledBy: function() { |
var label = Polymer.dom(this.root).querySelector('label'); |
if (!label) { |