| OLD | NEW |
| 1 // Generate unique, monotonically increasing IDs for labels (needed by | 1 // Generate unique, monotonically increasing IDs for labels (needed by |
| 2 // aria-labelledby) and add-ons. | 2 // aria-labelledby) and add-ons. |
| 3 Polymer.PaperInputHelper = {}; | 3 Polymer.PaperInputHelper = {}; |
| 4 Polymer.PaperInputHelper.NextLabelID = 1; | 4 Polymer.PaperInputHelper.NextLabelID = 1; |
| 5 Polymer.PaperInputHelper.NextAddonID = 1; | 5 Polymer.PaperInputHelper.NextAddonID = 1; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-con
tainer>`. This | 8 * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-con
tainer>`. This |
| 9 * behavior is implemented by `<paper-input>`. It exposes a number of properti
es from | 9 * behavior is implemented by `<paper-input>`. It exposes a number of properti
es from |
| 10 * `<paper-input-container>` and `<input is="iron-input">` and they should be
bound in your | 10 * `<paper-input-container>` and `<input is="iron-input">` and they should be
bound in your |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 * @return {boolean} | 423 * @return {boolean} |
| 424 */ | 424 */ |
| 425 validate: function() { | 425 validate: function() { |
| 426 return this.inputElement.validate(); | 426 return this.inputElement.validate(); |
| 427 }, | 427 }, |
| 428 | 428 |
| 429 /** | 429 /** |
| 430 * Forward focus to inputElement. Overriden from IronControlState. | 430 * Forward focus to inputElement. Overriden from IronControlState. |
| 431 */ | 431 */ |
| 432 _focusBlurHandler: function(event) { | 432 _focusBlurHandler: function(event) { |
| 433 if (this._shiftTabPressed) | |
| 434 return; | |
| 435 | |
| 436 Polymer.IronControlState._focusBlurHandler.call(this, event); | 433 Polymer.IronControlState._focusBlurHandler.call(this, event); |
| 437 | 434 |
| 438 // Forward the focus to the nested input. | 435 // Forward the focus to the nested input. |
| 439 if (this.focused) | 436 if (this.focused && !this._shiftTabPressed) |
| 440 this._focusableElement.focus(); | 437 this._focusableElement.focus(); |
| 441 }, | 438 }, |
| 442 | 439 |
| 443 /** | 440 /** |
| 444 * Handler that is called when a shift+tab keypress is detected by the menu. | 441 * Handler that is called when a shift+tab keypress is detected by the menu. |
| 445 * | 442 * |
| 446 * @param {CustomEvent} event A key combination event. | 443 * @param {CustomEvent} event A key combination event. |
| 447 */ | 444 */ |
| 448 _onShiftTabDown: function(event) { | 445 _onShiftTabDown: function(event) { |
| 449 var oldTabIndex = this.getAttribute('tabindex'); | 446 var oldTabIndex = this.getAttribute('tabindex'); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 } | 515 } |
| 519 } | 516 } |
| 520 } | 517 } |
| 521 | 518 |
| 522 /** @polymerBehavior */ | 519 /** @polymerBehavior */ |
| 523 Polymer.PaperInputBehavior = [ | 520 Polymer.PaperInputBehavior = [ |
| 524 Polymer.IronControlState, | 521 Polymer.IronControlState, |
| 525 Polymer.IronA11yKeysBehavior, | 522 Polymer.IronA11yKeysBehavior, |
| 526 Polymer.PaperInputBehaviorImpl | 523 Polymer.PaperInputBehaviorImpl |
| 527 ]; | 524 ]; |
| OLD | NEW |