Skip to content

disable capitalization of words when typing in input boxes #77

@rouilj

Description

@rouilj

Do not autocapitalize words entered into inputs. E.G. "chatting" becomes "Chatting" when entered in chrome or safari.
This is very common issue with mobile devices. I saw it on my phone.

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize

I can either add the attribute: autocapitalize=off to the search form or each individual input.
Since the field overrides a setting on an individual input, I am putting
it on the inputs in case we want this on in the future.

diff --git a/html/classhelper.js b/html/classhelper.js
index 3ff630ef..2079ae4d 100644
--- a/html/classhelper.js
+++ b/html/classhelper.js
@@ -589,7 +593,8 @@ class ClassHelper extends HTMLElement {
             } else {
                 input = document.createElement("input");
                 input.setAttribute("type", "text");
-
+                input.setAttribute("autocapitalize", "off")
+	      
                 if (formData) {
                     let value = formData.get(param);
                     if (value) {

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions