Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML autocorrect for text input is not working

I am trying to perform some autocorrect for English words in text input. Here is my code:

<input autocomplete="on" autocorrect="on" autocapitalize="on" type="text" name="textinput" placeholder="Enter a test" spellcheck="on">

My JSFiddle

However, it does not seems to work on Chrome by using a desktop computer. Is this feature only applicable for mobile?

like image 438
BlackMamba Avatar asked Oct 20 '25 08:10

BlackMamba


2 Answers

Try using spellcheck="true" html attribute instead of autocorrect="on"

<input autocomplete="on" spellcheck="true" autocapitalize="on" type="text" name="textinput" placeholder="Enter a test" spellcheck="on">
like image 195
Dmitry Khotinskiy Avatar answered Oct 22 '25 22:10

Dmitry Khotinskiy


autocorrect="on" is currently a non-standard attribute.

This is a non-standard attribute supported by Safari that is used to control whether autocorrection should be enabled when the user is entering/editing the text value of the <input>

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#attr-autocorrect

like image 21
Derek Hopper Avatar answered Oct 22 '25 22:10

Derek Hopper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!