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

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

Issue 26258003: Add a full QWERTY layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix edge case in WebUI Created 7 years, 2 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-keyboard.html
diff --git a/ui/keyboard/resources/elements/kb-keyboard.html b/ui/keyboard/resources/elements/kb-keyboard.html
index c29dac618db3e622129b6ab22bb85da48bbcb6c2..dbc8ab4ee91f1a64600bd0aaafd6875775ea0142 100644
--- a/ui/keyboard/resources/elements/kb-keyboard.html
+++ b/ui/keyboard/resources/elements/kb-keyboard.html
@@ -212,7 +212,8 @@
*/
inputTypeToLayoutMap: {
number: "numeric",
- text: "qwerty"
+ text: "qwerty",
+ password: "system-qwerty" //TODO(rsadam@): Add unit test for this.
},
/**
@@ -251,12 +252,7 @@
var layout = this.inputTypeToLayoutMap[this.inputType];
if (!layout)
layout = this.inputTypeToLayoutMap.text;
- // Reselects the default keyset if target layout is the same as current
- // layout. This forces a reset of the keyboard state.
- if(this.layout == layout)
- this.selectDefaultKeyset();
- else
- this.layout = layout;
+ this.layout = layout;
},
/**
@@ -596,6 +592,26 @@
},
/**
+ * The current input type.
+ * @type {string}
+ */
+ get inputTypeValue() {
+ return inputType;
+ },
+
+ /**
+ * Changes the input type if it's different from the current
+ * type, else resets the keyset to the default keyset.
+ * @type {string}
+ */
+ set inputTypeValue(value) {
+ if (value == this.inputType)
+ this.selectDefaultKeyset();
+ else
+ this.inputType = value;
+ },
+
+ /**
* Generates fabricated key events to simulate typing on a
* physical keyboard.
* @param {Object} detail Attributes of the key being typed.
« no previous file with comments | « ui/keyboard/resources/elements/kb-key-sequence.html ('k') | ui/keyboard/resources/layouts/system-qwerty.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698