Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.1.8f1
2021.1
Issue ID
1283421
Regression
No
[Mobile] Unable to enter comma as a decimal separator in Input Field
How to reproduce:
1. Open project "InputField.zip"
2. Build and Run on Android
3. Try to press comma on the keyboard (if there is one on the keyboard)
Expected result: Can use comma as a decimal separator instead of decimal point
Actual result: Cannot enter comma
Reproducible with: 2019.4.13f1, 2020.1.10f1, 2020.2.0b8, 2021.1.0a2
Can't test with: 2018.4.28f1 (Input Field does not filter digits)
Reproducible with:
VLNQA00277, Asus ROG Phone, Android: 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00006, Samsung Galaxy S7, Android: 8.0.0, CPU: Exynos 8 Octa 8890, GPU: Mali-T880
VLNQA00121, Samsung Galaxy S9, Android: 9, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00030, Lge LG G2, Android: 4.4.2, CPU: Snapdragon 800 MSM8974, GPU: Adreno (TM) 330
VLNQA00248, iPhone XR, iOS: 13.4.1
VLNQA00241, iPhone 8 Plus, iOS: 12
Not reproducible with:
Editor on Windows
Editor on macOS
Player on Windows
Player on macOS
Notes:
- Changing keyboards or phone system language did not help
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2021.1.X):
Unfortunately, this is Android bug, see: https://stackoverflow.com/questions/3821539/decimal-separator-comma-with-numberdecimal-inputtype-in-edittext
I could get decimal separator using this code:
using (var klass = new AndroidJavaClass("java.text.DecimalFormatSymbols"))
{
var instance = klass.CallStatic<AndroidJavaObject>("getInstance");
var separator = instance.Call<char>("getDecimalSeparator");
}
for Lithuanian language it correctly returns ',', but the keyboard disregards it.
The only solution I can see is to allow a broader set of characters and handle them yourself. This is the proposed solution even for native android controls.