UMB-CS-682-Team-03 / tracker

0 stars 0 forks source link

disable capitalization of words when typing in input boxes #77

Closed rouilj closed 5 months ago

rouilj commented 5 months ago

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) {