NumberInput
not working as expected on iOS when decimal keypad uses a comma but locale
expects a dot
#3514
baptisteArno
started this conversation in
General
Replies: 3 comments 1 reply
-
Setting the |
Beta Was this translation helpful? Give feedback.
0 replies
-
This one is tricky; we can't fix it at the moment since we explicitly rely on the locale. We can consider Option 2, as it offers a broader API. This is more of a nice-to-have at the moment. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Open for contribution for this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
On iOS devices, when the user's keyboard language is set to one that uses a comma (
,
) as the decimal separator (e.g. French, German, Italian), the numeric keypad does not include a dot (.
). Only a comma is shown.However,
NumberInput
could expect a dot (.
) whenlocale
is set toen-US
(the default). This leads to broken input when a user types a valid comma-separated number (e.g.1,23
).Expected Behavior
1,23
should be interpreted as1.23
especially if the current browser is iOSSteps to Reproduce
fr-FR
,de-DE
)<NumberInput inputMode="decimal" />
in a web app. iOS shows a numeric keypad with a comma (,
) but no dot (.
)1,23
123
because comma is not considered as decimal separator.Ark UI Version
5.11.0
Framework
Browser
Webkit iOS
Suggested Solutions
,
to.
before parsing if likely used as decimalparse
ornormalize
prop: Allow developers to define how raw input is interpreteddecimalSeparator
override: Allow developers to specify the decimal separator explicitlyBeta Was this translation helpful? Give feedback.
All reactions