I have a problem that I'm not sure if it is a bug, some weirdness about the android keyboard, etc.
Suppose you have this input box somewhere:
<input type='number' step='any' >
On the default ICS android browser, the Safari mobile browser, iOS Chrome (and probably others), this does exactly what you would expect: it brings up a keyboard with both numbers and a decimal point (because of the step).
However on Chrome on android (and as I said only this version), it brings up a number pad with no decimal.
Does anyone know a workaround?
Additional Details
It appears to be limited to a combination of the Samsung keyboard and Google Chrome. The following works:
So, it seems only the combination of both the Samsung keyboard and Chrome that causes a problem.
Next: Troubleshoot Chrome crash problems If it works in another browser, try uninstalling and reinstalling Chrome. There could be something wrong with your Chrome profile that's causing problems. Uninstall Chrome and make sure to check the box to delete browsing data. Then, reinstall Chrome.
You can also use a decimal value: for example, a step of 0.3 will allow values such as 0.3, 0.6, 0.9 etc, but not 1 or 2. Now you don't get a validation error. Yay! Also note that if you only want to accept positive numbers, you'll want to add min=”0″.
This issue appears to be fixed https://code.google.com/p/chromium/issues/detail?id=151738#c17 . I think this was fixed in Chrome Mobile 36 released June 2014 - it certainly is fixed in Chrome Mobile 47 which is the only version I have on a Samsung phone at the moment.
If you don't have many users, there are two workarounds:
Ask user to install the Google Keyboard and enable it - see https://play.google.com/store/apps/details?id=com.google.android.inputmethod.latin
Ask user to use the native browser (ask user to use the App with the world icon labelled "Internet").
Apps using WebView on Android 4.4 are stuck with Chrome 30 or 33 for the WebView, so I would guess that Samsung Android 4.4 phones using WebView are affected. Using WebView on any other version of Android shouldn't be affected (Android 4.3 or less used the native browser for the WebView and Android 5.0+ should use a version of Chrome without the bug because Chrome WebView updated).
Also relevant is Samsung browser versions by phone and comments about the Samsung browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With