Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @fileoverview | 6 * @fileoverview |
| 7 * 'pin-keyboard' is a keyboard that can be used to enter PINs or more generally | 7 * 'pin-keyboard' is a keyboard that can be used to enter PINs or more generally |
| 8 * numeric values. | 8 * numeric values. |
| 9 * | 9 * |
| 10 * Properties: | 10 * Properties: |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 } | 92 } |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 /** | 95 /** |
| 96 * @override | 96 * @override |
| 97 */ | 97 */ |
| 98 attached: function() { | 98 attached: function() { |
| 99 // Remove the space/enter key binds from the polymer | 99 // Remove the space/enter key binds from the polymer |
| 100 // iron-a11y-keys-behavior. | 100 // iron-a11y-keys-behavior. |
| 101 var digitButtons = Polymer.dom(this.root).querySelectorAll('.digit-button'); | 101 var digitButtons = Polymer.dom(this.root).querySelectorAll('.digit-button'); |
| 102 for (var i = 0; i < digitButtons.length; ++i) | 102 for (var i = 0; i < digitButtons.length; ++i) { |
| 103 digitButtons[i].keyEventTarget = null; | 103 digitButtons[i].keyEventTarget = null; |
| 104 digitButtons[i].noink = true; | |
|
jdufault
2016/10/17 19:25:13
Set this inside of the HTML?
<paper-button noin
sammiequon
2016/10/17 23:56:14
Done.
| |
| 105 } | |
| 104 }, | 106 }, |
| 105 | 107 |
| 106 /** | 108 /** |
| 107 * Gets the container holding the password field. | 109 * Gets the container holding the password field. |
| 108 * @type {!HTMLInputElement} | 110 * @type {!HTMLInputElement} |
| 109 */ | 111 */ |
| 110 get inputElement() { | 112 get inputElement() { |
| 111 return this.$$('#pin-input'); | 113 return this.$$('#pin-input'); |
| 112 }, | 114 }, |
| 113 | 115 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 // does not contain decimals. | 314 // does not contain decimals. |
| 313 // This heuristic will fail for inputs like '1.0'. | 315 // This heuristic will fail for inputs like '1.0'. |
| 314 // | 316 // |
| 315 // Since we still support users entering their passwords through the PIN | 317 // Since we still support users entering their passwords through the PIN |
| 316 // keyboard, we swap the input box to rtl when we think it is a password | 318 // keyboard, we swap the input box to rtl when we think it is a password |
| 317 // (just numbers), if the document direction is rtl. | 319 // (just numbers), if the document direction is rtl. |
| 318 return (document.dir == 'rtl') && !Number.isInteger(+password); | 320 return (document.dir == 'rtl') && !Number.isInteger(+password); |
| 319 }, | 321 }, |
| 320 }); | 322 }); |
| 321 })(); | 323 })(); |
| OLD | NEW |