I'm searching for a way to make mobile browsers accept text input as is rather than fixing it automatically with features like autocomplete or autocapitalize. I.e. I want to get "wrong" inputs to identify spelling mistakes and typos manually.
For Chrome 87 on Android the following markup from David Walsh does exactly that:
<form>
<input type="text" autocapitalize="none" autocomplete="off" autocorrect="off" spellcheck="false">
</form>
(As far as I can see autocorrect and spellcheck are not even needed by Chrome, though.)
Unfortunately, this doesn't work for Firefox 84 on Android. E.g. when I type in english character-by-character this will automatically be replaced with English . (I already discovered that the exact replacements depend on the used keyboard language. So for reference I'm using the Samsung keyboard with English (US) language here.) You can test yourself with different browsers here.
So my question is: Is there a way to make Firefox - and ideally other mobile browsers - accept text input as is like Chrome does with the markup above?
Related
Hy,
On my website, you have to submit a money amount(with often cents).
<input type="number" step="0.1"/>
My issue is that on some version(android 4.3, Edit : android 2.3.3) of the native android browser, the numeric pad who appear don't have the '.'
I want to keep the numeric pad for writing the amount
Any idea how I can do ?
Edit:
I prefere not having to split it.
You can split the field to two different field:
<input type="number" name="number"/>
<input type="number" name="decimal" />
By submit you can add them together with:
$_POST['number'] . ',' . $_POST['decimal']
The issue is, in fact, not in the html nor in the browser, but in the android default keypad for the android 4.3:
the numeric version of the keypad don't allow comma
If I don't want to impact the use for the unimpacted user,
The solution would be to ask to the impacted user to switch to annother key app.
Or wait an update of the keyapp.
So on most versions of Android, using a Samsung device, the <input type="number"> pulls up the number pad, but does not allow the entry of a decimal. From searching on the web, this is a known bug, but I've found very little talk regarding solutions or response from Samsung.
Anyone have a good idea to solve the problem? Best I can come up with is writing a script that replaces <input type="number"> with <input type="tel">. This brings up a number pad at least, and you can get to the decimal by tapping on the symbol key.
NOTE: I get the same behavior with or without the pattern="[0-9\.]*" attribute and/or the step="any" attribute. Also, I'm looking for a pure web-based solution, not a native app solution.
You can create a custom keyboard using IME. Here is a link http://developer.android.com/guide/topics/text/creating-input-method.html
If I have an input element of type "text", is there a way to prevent the Android keyboard from making suggestions when inputting to that element?
In a native Android app this would be "textNoSuggestions", but is there an equivalent for the web?
yes, you have the attribute autocomplete="off|on"
so, for instance, you use:
<input type="email" name="email" autocomplete="off">
and also can add other, like
<input autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false">
With this, you shouldnt get the field dropdown with the browser suggestions based on input history, but the keyboard is still giving its own suggestions (thats on the inputmethod side, and not in the browser side).
For this, probably you can only try with some patches, that i wont recommend. I havent find any clean solution, and some time ago #CommonsWare said in this answer that he hasn't seen anything, so if there has not been any change in this time, probably this wont be possible.
I put a WebBrowser component in my app because I have to display a webpage. The webpage also contains an input box.
<input name="nome" style="width:160px" type="text" />
This is the HTML code I wrote. By the way, when I click on it with my Samsung device because I must type some text, the keyboard doesn't appear.
What could I do?
You can see the webpage here: click
It's a known limitation of the web browser component.
It's doubtless findable in Embo's QC database.
It's pending a fix, I gather.
<checks>
Oh yes, here it is: QC 119313
Also documented in the Delphi XE5 Release Notes
I have an app written in HTML 5 with an input that looks like <input type="number" min="0" max="12">, but this doesn't validate. You can write any numeric value and it doesn't get stripped on blur. Does anyone know if this is a known issue for apps?
Now I'm validating the field in JavaScript but would like to use the HTML 5 functionality if that's possible.
It looks like Android only has partial support for <input type="number">. It appears to ignore the min and max attributes.
That caveat aside, I think your understanding of how these fields are treated is flawed. The browser will not strip invalid characters on your behalf. If it detects that there are values that don't match the input criteria, it may prompt the user to fix their input, but it's up to you (the app developer) to do the actual validation and/or any filtering.
Check out Dive Into HTML5's section on forms for more information.