Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(866)

Unified Diff: ui/keyboard/resources/elements/kb-keyset.html

Issue 140123002: Work around for content select not supporting touch events on it's children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698