Chromium Code Reviews| Index: ui/keyboard/resources/elements/kb-keyset.html |
| diff --git a/ui/keyboard/resources/elements/kb-keyset.html b/ui/keyboard/resources/elements/kb-keyset.html |
| index d480f507dd3800bd9c46dd61a9748f25f89f3bb7..fa2d343b5f55d75b941cad83d9a402cbb1a191d0 100644 |
| --- a/ui/keyboard/resources/elements/kb-keyset.html |
| +++ b/ui/keyboard/resources/elements/kb-keyset.html |
| @@ -13,6 +13,9 @@ |
| -webkit-box-orient: vertical; |
| display: -webkit-box; |
| } |
| + :host:not(.activeKeyset) { |
| + display: none; |
| + } |
| </style> |
| <content select="kb-row"></content> |
| <content select="kb-altkey-container" id="altkeyContainer" |
| @@ -77,7 +80,26 @@ |
| var nodes = activeAltKeySet.childNodes; |
| nodes[activeAltKeySet.offset].classList.add('active'); |
| altkeyContainer.hidden = false; |
| - } |
| + }, |
| + |
| + show: function() { |
| + this.classList.add('activeKeyset'); |
|
kevers
2014/01/15 23:33:07
Worth checking if you're already active. This met
rsadam
2014/01/17 15:43:53
Done.
|
| + this.fire('stateChange', { |
| + state: 'keysetChanged', |
| + value: this.id |
| + }); |
| + }, |
| + |
| + hide: function() { |
| + this.classList.remove('activeKeyset'); |
| + }, |
| + |
| + enteredView: function() { |
| + // TODO(rsadam): Fix the stutter when a keyset is first loaded. Should |
| + // be fixable after pixel perfect lands. |
| + if (this.isDefault) |
|
kevers
2014/01/15 23:33:07
The stutter can be addressed by doing the equivale
rsadam
2014/01/17 15:43:53
Didn't have luck with veil/unveil. endOrMicroTask
|
| + this.show(); |
| + }, |
| }); |
| </script> |
| </polymer-element> |