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

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

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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-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) {

Powered by Google App Engine
This is Rietveld 408576698