What models of Samsung smartphones have missing period for html5 input type="number"?
Asked Answered
M

2

5

HTML5 has a new input type named "number". On most mobile smartphones this brings up a numeric keypad. On pre-html5 phones the type falls back to "text" and we are OK. Yet, on some models the numeric keypad does not have a period and one cannot click the "symbols" button to add one. Known models with this flaw are:

What other models? Older Samsung Android 2.2 phone does not have this problem. Other Android devices such as Nabi Tab do not have this problem. I read the Galaxy S3 did not have this problem.

See related discussion:

Also, not noted on those is that input type="tel" works fine for iPad but does not work as a replacement for number on an iPhone. So, a webapp must determine the device model or else resort to input type="text".

What phone and tablet models incorrectly interpret input type="number" as a whole, non-decimal input keyboard?

Mayotte answered 21/4, 2014 at 20:31 Comment(8)
Probably hundreds of device models lack number support. Not all browsers will support it even for devices that offer it (e.g., they roll their own input mechanism rather than relying upon Android's native IMEs). And not all IMEs will necessarily honor the browser's request for a numeric keypad with a period, since IMEs can be written by anyone.Stemware
Thank you for the comment CommonsWare. I should have been more clear in my question. I'm editing it now. Only care about the WRONG support.Mayotte
Only care about the WRONG support in the Android browser since we are using an embedded Android WebView. Maybe some other mobile browsers have it wrong; but I think they actually are better in the little testing I've done.Mayotte
"Only care about the WRONG support in the Android browser since we are using an embedded Android WebView" -- do not assume that "the Android browser" and WebView have the same behavior in this area.Stemware
Also worth noting the model number is passed in the user-agent; but some model names have more than one model number.Mayotte
Testing so far reveals this is broken in both Android Browser and embedded WebView. Users could use another browser for a closed app, of course.Mayotte
Best soln so far is to type="tel" for all Android and type="number" for others(iOS). Not semantically correct per HTML5; but, best user experience at this time. We'll probably be encumbered with these Android devices having significant market share for at least another handful of years.Mayotte
This says SIII also has this bug: #12514662Mercurochrome
M
0

It turns out to be all SAMSUNG with 4.x as well as HTC with 4.4 and reports of other vendors (Xperia). Long story short, at least put in the fix for anything with User-Agent having SAMSUNG or HTC and running 4.x; but possibly put in the fix for anything having ANDROID.

Mercurochrome answered 2/6, 2014 at 12:11 Comment(2)
Did Google willfully sabotage HTML5? Or did Samsung and now HTC? Or are the programmers working for Samsung and HTC based in a country where decimals are not used for currency (and Samsung not test their products nor observe feedback for the last almost TWO years)? Its a mystery but sure does make Android fans lose their luster since iOS does this right. Not only doesn't this BASIC HTML5 feature work correctly, but datalist, keycodes, and others are broken. Even Google folks are complaining [to themselves?] since keycode is needed to make angularjs work. Its a nutty, poorly supported world.Mercurochrome
Some models omit the "SAMSUNG" when in the embedded WebView; so one must match on their model number.Mayotte
K
0

I have discovered a work around for this problem. It works for my Samsung Galaxy S2 phone and I suspect it will work for all Samsung devices that suffer from the "missing decimal point" problem on the numeric keyboard. Hopefully others with different Samsung devices can check this solution and report their findings.

Unfortunately, it is a client based (phone owner) solution so it does not really help from a web developer standpoint. Here is the solution that worked for me:

  1. While in the browser click on the menu icon (bottom left of phone)
  2. Select Settings
  3. Select Privacy and Security
  4. Scroll down and uncheck "Remember Form Data" and select "Clear Form Data"
  5. Click OK to confirm

After following this procedure, the numeric keypad should show an extra button labelled .- That is, the same button is used for both minus signs and decimal points. Double-click this button to get a minus sign (provided the field is currently empty) and single click to get a decimal point.

Kreiner answered 16/11, 2014 at 4:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.