Bug 200226 - Wrong keyboard for "inputmode=numeric"
Summary: Wrong keyboard for "inputmode=numeric"
Status: RESOLVED DUPLICATE of bug 197916
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 12
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-29 08:39 PDT by Brad
Modified: 2019-07-30 09:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad 2019-07-29 08:39:28 PDT
The "numeric" and "decimal" values of `inputmode` are both supposed to trigger number keyboards, with "decimal" being different only in that it should include the decimal point. Both should be able to enter any whole number, while "decimal" should also be able to enter decimal numbers, via the addition of a decimal point key on the keyboard.

But in iOS Safari, "numeric" creates a keyboard with more keys instead of fewer. It can type decimals because it also includes a decimal point (period) key. But it strangely can also type all sorts of punctuation.

So as an author, if I have a field that I want people to only type whole numbers into, I want to be able to specify "inputmode=numeric" and get a keyboard that has numbers, minus sign, and nothing else, in order to discourage expectations that other keys are acceptable. But in iOS Safari, I get something else completely. This bug then leads me to use "inputmode=decimal" when I don't really want decimal, because at least it is a number keypad and doesn't actually have a bunch of irrelevant punctuation keys (this is assuming I don't care about the negative key missing from decimal, which is another bug). So, what I'm saying is that this bug is harming the Web by causing authors to put the wrong thing into their HTML. And it is likely to harm iOS worse than Android, because authors will detect the platform and include "decimal" for iOS and "numeric" for Android, in order to get the closest result to what they really want.
Comment 1 Wenson Hsieh 2019-07-29 08:42:58 PDT
After r245338, inputmode=“numeric” should now show the numeric keyboard (i.e. a 0-9 keypad). This change should be in the latest iOS 13 beta — could you verify that it’s fixed there?
Comment 2 Alexey Proskuryakov 2019-07-30 09:12:17 PDT
Marking as a duplicate based on Wenson's comment. Please feel free to re-open if this is still an issue.

*** This bug has been marked as a duplicate of bug 197916 ***