From d0e5b82af442510270fe9e265a8ada1e5dfafcf1 Mon Sep 17 00:00:00 2001 From: Dave Tapuska Date: Wed, 12 Sep 2018 10:49:57 -0700 Subject: [PATCH] Add experimental support for enterKeyHint. enterKeyHint allows customization of the virtual keyboard enter key. Enabled behind a flag since it isn't approved to ship yet. Spec: https://github.com/whatwg/html/pull/3538 BUG=634330 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I32b510d8157e0c676300a38bb4c7fa2bbced0b3d --- html/dom/elements-misc.js | 1 + .../forms/attributes-common-to-form-controls/contains.json | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/html/dom/elements-misc.js b/html/dom/elements-misc.js index df415aef159f7a..b747ac6e5966cd 100644 --- a/html/dom/elements-misc.js +++ b/html/dom/elements-misc.js @@ -53,6 +53,7 @@ var miscElements = { // Global attributes should exist even on unknown elements undefinedelement: { + enterKeyHint: {type: "enum", keywords: ["enter", "done", "go", "next", "previous", "search", "send"]}, inputMode: {type: "enum", keywords: ["none", "text", "tel", "url", "email", "numeric", "decimal", "search"]}, }, }; diff --git a/html/semantics/forms/attributes-common-to-form-controls/contains.json b/html/semantics/forms/attributes-common-to-form-controls/contains.json index 357a1e6a7b8e97..62326d33f8748c 100644 --- a/html/semantics/forms/attributes-common-to-form-controls/contains.json +++ b/html/semantics/forms/attributes-common-to-form-controls/contains.json @@ -23,6 +23,10 @@ "id": "autofocusing-a-form-control-the-autofocus-attribute", "original_id": "autofocusing-a-form-control:-the-autofocus-attribute" }, + { + "id": "input-modalities-the-enterkeyhint-attribute", + "original_id": "input-modalities:-the-enterkeyhint-attribute" + }, { "id": "input-modalities-the-inputmode-attribute", "original_id": "input-modalities:-the-inputmode-attribute" @@ -31,4 +35,4 @@ "id": "autofilling-form-controls-the-autocomplete-attribute", "original_id": "autofilling-form-controls:-the-autocomplete-attribute" } -] \ No newline at end of file +]