Looking for Solutions to Samsung's crappy number keyboard - android

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

Related

Disable autocomplete for html inputs

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?

Chrome for Android mistakenly autocorrect on contenteditable

I have the following contenteditable area
<div contenteditable="true"><p><br /></p></div>
The "<p><br /></p>" is from the database. It's not I hardcarded it on HTML. So I can't change that. That's a very strange behaviour for Chrome on Android.
When I type 'ok', press enter, and then press backspace again, the text is autocorrected as 'OOk'. And the cursor is still on the second line.
You can try this with Chrome for Android: http://jsfiddle.net/73s4pjz9/
How can I solve this strange bug?
Well, you can't, sadly.
To my knowledge (and I've spent hours researching this infuriating bug), there isn't a way to fix it on your end because it's a bug with the WebView class that hasn't been fixed for about 2 years. Basically what happens is Android's autocorrect engine gets out of sync with the contenteditable's selection and things get messy.
Sadly, I wasn't able to find a solution to this bug, so your best bet is to either make Android users suck it up or give them a native textarea without the cool WYSIWYG features.

Phonegap Android force numeric keyboard on input

I'm using
-webkit-user-modify: read-write-plaintext-only;
on my input fields in my app to prevent several behavior with android ICS but i would like to force the numeric keyboard to show up on specific inputs. And i want to keep the CSS line.
Is there a way to do it ? by modifying some classes in the .java files ? Or maybe is there another way ?
Thanks
On HTML5 (as you're talking on Java mods, I wrote this to be clear):
The only way to trigger the numeric keyboard on Android devices is to use <input type="number"> or <input type="tel">. That comes with some small problems, especially if you're dealing with Angular or with HTML5 native validation, but for the general use this should be no problem.

Android app doesn't read input boxes

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

Android Apps html5 input type = 'number' max anf min doesn't work

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.

Categories

Resources