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

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: Fixed nit. 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
« no previous file with comments | « ui/keyboard/resources/elements/kb-keyboard.html ('k') | ui/keyboard/resources/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7630c014877bcdb8d693501c7f1061acd1b0116f 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,6 +80,26 @@
var nodes = activeAltKeySet.childNodes;
nodes[activeAltKeySet.offset].classList.add('active');
altkeyContainer.hidden = false;
+ },
+
+ show: function() {
+ var old = $('keyboard').querySelector('.activeKeyset');
+ if (old && old != this)
+ old.classList.remove('activeKeyset');
+ this.classList.add('activeKeyset');
+ this.fire('stateChange', {
+ state: 'keysetChanged',
+ value: this.id
+ });
+ },
+
+ enteredView: function() {
+ if (this.isDefault) {
+ var self = this;
+ Platform.endOfMicrotask(function() {
+ self.show();
+ });
+ }
}
});
</script>
« no previous file with comments | « ui/keyboard/resources/elements/kb-keyboard.html ('k') | ui/keyboard/resources/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698