Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off predictive text for password field on websites

I have an Android application that displays a page in a webview to handle a username/password login. I have found that with certain keyboards (like the stock keyboard on Samsung Jellybean devices), the predictive text is changing what the user types in the password field.

For example, if the password is "ab!d", the predictive text tries to help by automatically entering a space after the punctuation, making it "ab! d" and causes an incorrect password to be entered. The only reason I know that predictive text is behind this is that this problem does not occur when predictive text is turned OFF through the keyboard menu settings.

Is there a way to disable the predictive text when typing in the web form? I already have the input type set to "password" to mask the entry. This is not an Android TextView (it is an HTML input), so I don't have the platform level controls on the input, and as far as I know, Android does not understand the "autocorrect=off" setting that some sites use to tackle this problem on iOS devices.

I have noticed that this problem does not seem to happen on other websites like mail.google.com. The same keyboard, regardless of settings, will politely leave the user's input alone on the password field there. Looking through the HTML source on that page did not reveal anything special on the password field, only the same input type that I already use.

Have any of you run into this problem, or can you think of possible solutions? Is there something that mail.google.com or other sites do that I am missing? Any help will be greatly appreciated.

Sample of the HTML is below:

<div data-role="fieldcontain" class="ui-hide-label"  >
<label for="USER">ID</label>
<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"  type="text" name="USER" id="USER" value="" maxlength="50" placeholder="${userId_text}" data-theme="c"/>
</div>
<div data-role="fieldcontain" class="ui-hide-label">
<label for="password">Password</label>
<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"  type="password" name="password" id="password" value="" maxlength="50" placeholder="Password" data-theme="c"/>
</div>

enter image description here

like image 976
user2149114 Avatar asked Mar 08 '13 16:03

user2149114


People also ask

How do I turn off predictive text permanently?

Go to the keyboard app's settings. Scroll down and look for “Text Correction” or something similar. Tap on “Predictive Text” or “Next-Word Suggestions” to toggle the feature off.

How do I make my keyboard stop suggesting words?

Just click on Settings, then click on Devices, followed by Typing. Next, locate the Hardware Keyboard section, shown in Figure 2, then turn off the option to suggest text as you type.


1 Answers

According to Disable Autocomplete, Autocapitalize, and Autocorrect, there a few different attributes to try.

<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />

Also, and answer to Turning off auto-complete for textarea and inputfields in Android Cordova-app suggests that <input name="password> is the solution. It's odd that type=password doesn't work.

like image 152
Kevin Hakanson Avatar answered Sep 18 '22 07:09

Kevin Hakanson