| OLD | NEW |
| 1 /* Copyright 2015 The Chromium Authors. All rights reserved. | 1 /* Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 Polymer('gaia-paper-button', { | 6 Polymer('gaia-paper-button', { |
| 7 onKeyDown: function(e) { | 7 onKeyDown: function(e) { |
| 8 if (e.keyCode == 13 || e.keyCode == 32) | 8 if (!this.disabled && (e.keyCode == 13 || e.keyCode == 32)) |
| 9 this.fire('tap'); | 9 this.fire('tap'); |
| 10 } | 10 } |
| 11 }); | 11 }); |
| 12 | 12 |
| 13 Polymer('gaia-core-icon-button', { | 13 Polymer('gaia-core-icon-button', { |
| 14 onKeyDown: function(e) { | 14 onKeyDown: function(e) { |
| 15 if (e.keyCode == 13 || e.keyCode == 32) | 15 if (!this.disabled && (e.keyCode == 13 || e.keyCode == 32)) |
| 16 this.fire('tap'); | 16 this.fire('tap'); |
| 17 } | 17 } |
| 18 }); | 18 }); |
| 19 | 19 |
| 20 Polymer('gaia-raised-on-focus-button', { | 20 Polymer('gaia-raised-on-focus-button', { |
| 21 onButtonFocus: function() { | 21 onButtonFocus: function() { |
| 22 this.raised = true; | 22 this.raised = true; |
| 23 }, | 23 }, |
| 24 | 24 |
| 25 onButtonBlur: function() { | 25 onButtonBlur: function() { |
| 26 this.raised = false; | 26 this.raised = false; |
| 27 }, | 27 }, |
| 28 }); | 28 }); |
| OLD | NEW |