I'd like the first letter on the android keyboard to appear lowercase when a user taps on a html text input
val
https://stackoverflow.com/a/5171812/4575543
I found this answer. Seems to work (but apparently not for all keyboard apps on android and not all older browsers). At least iOS is covering it and Chrome since version 43: https://developers.google.com/web/updates/2015/04/autocapitalize
Additionally I set the css property text-transform: lowercase;
and convert the input value on keyup
with value.toLowerCase()
– just in case.
来源:https://stackoverflow.com/questions/31589320/first-letter-in-android-keyboard-in-an-html-input-text-to-lowercase