| OLD | NEW |
| 1 /** | 1 /** |
| 2 * @demo demo/index.html | 2 * @demo demo/index.html |
| 3 * @polymerBehavior | 3 * @polymerBehavior |
| 4 */ | 4 */ |
| 5 Polymer.IronControlState = { | 5 Polymer.IronControlState = { |
| 6 | 6 |
| 7 properties: { | 7 properties: { |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * If true, the element currently has focus. | 10 * If true, the element currently has focus. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 }, | 69 }, |
| 70 | 70 |
| 71 _disabledChanged: function(disabled, old) { | 71 _disabledChanged: function(disabled, old) { |
| 72 this.setAttribute('aria-disabled', disabled ? 'true' : 'false'); | 72 this.setAttribute('aria-disabled', disabled ? 'true' : 'false'); |
| 73 this.style.pointerEvents = disabled ? 'none' : ''; | 73 this.style.pointerEvents = disabled ? 'none' : ''; |
| 74 if (disabled) { | 74 if (disabled) { |
| 75 this._oldTabIndex = this.tabIndex; | 75 this._oldTabIndex = this.tabIndex; |
| 76 this.focused = false; | 76 this.focused = false; |
| 77 this.tabIndex = -1; | 77 this.tabIndex = -1; |
| 78 this.blur(); |
| 78 } else if (this._oldTabIndex !== undefined) { | 79 } else if (this._oldTabIndex !== undefined) { |
| 79 this.tabIndex = this._oldTabIndex; | 80 this.tabIndex = this._oldTabIndex; |
| 80 } | 81 } |
| 81 }, | 82 }, |
| 82 | 83 |
| 83 _changedControlState: function() { | 84 _changedControlState: function() { |
| 84 // _controlStateChanged is abstract, follow-on behaviors may implement it | 85 // _controlStateChanged is abstract, follow-on behaviors may implement it |
| 85 if (this._controlStateChanged) { | 86 if (this._controlStateChanged) { |
| 86 this._controlStateChanged(); | 87 this._controlStateChanged(); |
| 87 } | 88 } |
| 88 } | 89 } |
| 89 | 90 |
| 90 }; | 91 }; |
| OLD | NEW |