Bug 60674 - Entry with Numeric keyboard does not process TextChanged event for dot/comma in some Locales
Summary: Entry with Numeric keyboard does not process TextChanged event for dot/comma ...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.5.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-14 16:01 UTC by Dmitijs Jesilevskis
Modified: 2018-02-15 13:44 UTC (History)
5 users (show)

Tags: entry, keyboard, locale, textchanged, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Reproduction app (310.77 KB, application/x-zip-compressed)
2017-11-14 16:01 UTC, Dmitijs Jesilevskis
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60674 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Dmitijs Jesilevskis 2017-11-14 16:01:18 UTC
Created attachment 25699 [details]
Reproduction app

Consider the following scenario.

Make sure device has English language setting
1) Run the reproduction app
2) Focus Entry box -> Numeric keyboard appears
3) Type digit - alert (attached to TextChanged event) is displayed
4) Type dot/comma - alert is displayed

Switch device to French language
1) Run the app
2) Focus Entry box -> Numeric keyboard appears
3) Type digit - alert (attached to TextChanged event) is displayed
4) Type dot/comma - alert is NOT displayed, text of the entry does not change
5) Type digit - alert is displayed

Note: there is no binding applied to the control in the sample

Actual:
- dot/comma from Numeric keyboard is not processed in some locales (e.g. French), TextChanged event does not fire

Expected:
- dot/comma from Numeric keyboard is processed without restrictions, TextChanged event fires

Issue is reproduced with Samsung Galaxy A5 and Huawei P9 Lite devices.
Comment 1 adrianknight89 2017-11-25 20:16:34 UTC
I tried to reproduce this on S6 / Android 7 with Google Keyboard but could not. I was able to process a dot in English and a comma in French but not both at the same time in either language. Is this expected behavior based on locale?

Also, I observed some behavior that should be checked for verification:

A dash can only be processed if it's the first character. Why?
Space does not work. Why?
Comment 2 Dmitijs Jesilevskis 2017-11-25 23:14:17 UTC
The issues is reproduced with vanilla keyboard. Custom keyboards, like SwiftKey keyboard, is a workaround.
Apart from French, issue affects all languages, where comma is a decimal separator - so this is an issue for our customer having users around the globe.

Judging by behavior, it seems, that there was an attempt to make sure only valid decimal text (that can be parsed to decimal without issues) is allowed to the Entry box, when Numeric keyboard is enabled - is this undocumented change in XF 2.4.0?
And so, this behavior fails, when non-dot decimal separator is used in specific locales.

Also we observed, that constraints affect only Android, and for iOS and UWP, there are no hints of such constraints. This causes unwanted discrepancies in behavior across platforms.
Comment 3 Fernando 2017-12-11 11:35:58 UTC
Hi,

This bug is an old friend, in my country all apps that input currency info have to create their own workaround (like TextChanged events to control formatting). Google delayed this fix since 2009 but it appears that the Android 8.0+ will address this.

https://code.google.com/p/android/issues/detail?id=2626