Describe the bug
When a locale has a group (thousands separator) defined as a space, Soho.Locale.parseNumber() does not parse the value correctly.
test-number-with-group-of-space.zip
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The number should parse correctly
Version
Screenshots


Platform
Additional context
It appears that the regular expression removing spaces does not work correctly.
Probably should be high priority as any customer using the Landmark Web with a locale that has a group of space would not be able to save their decimal values correctly as parseNumber() is used to transform the value from the locale to Landmark format.
I’ll take a look along with #2878 and see if they can be squashed together. Not 100 percent sure but I don’t believe any of the current supported locales have spaces. So this may be a new case
Use fr-FR as it does.
I think you want something like > .replace(new RegExp('\\' + group, 'g'), '')
Looks like quite a few do, 18 by my count.
Test FAILED
please see the screenshot for reference.
Browser: EDGE
locale=ar-SA
Expected Result

Browser: SAFARI
locale=ar-SA
Expected Result

Browser: IE11
locale=ar-SA
Expected Result

locale=en-US
Expected Result

locale=es-ES
Expected Result

locale=fr-FR
Expected Result

Browser: Firefox
locale=ar-SA
Expected Result

btw, ANDROID and iOS work perfectly fine in all four locales.
New fixes have been added for the noted cases.
Test Failed . Issue still persist except on the ff browsers and locales
-IE11 en-US
-IE11 es-ES
-IE11 fr-FR
Verified in http://master-enterprise.demo.design.infor.com/components/mask/test-number-parsing.html?
@jbrcna Can you please be more explicit about what is NOT working. I find it confusing that you say that the issue is still there except some browsers?
I
I think all the main cases are fixed here so probably just consider this done. Unless im missing some tests where it isnt working?
@tmcconechy, @jbrcna indicated issue still occurs on everything other than IE, but I just ran through all of the cases on the browsers with the link @jbrcna gave above and saw everything parsing correctly. It was only for Firefox with ar-SA that I had use the period for the decimal instead of pasting the value.
@fitzorama i noticed master was not updated after posting this. This could be why?
@tmcconechy I'm seeing all my changes in place
Ok it was effecting a few other PR's then. I will just move this to done as is. Im seeing it working ok
Hello @tmcconechy, to answer your question, based on the noted cases above on my first comment
Test Passed on the ff cases below
-IE11 en-US
http://master-enterprise.demo.design.infor.com/components/mask/test-number-parsing.html?locale=en-US
-IE11 es-ES
http://master-enterprise.demo.design.infor.com/components/mask/test-number-parsing.html?locale=es-ES
-IE11 fr-FR
http://master-enterprise.demo.design.infor.com/components/mask/test-number-parsing.html?locale=fr-FR
Test Failed on the ff cases below
enter 1234567.12 and tab out
If unable to enter the period, try pasting 1234567Ù«12
Number Field should display 1Ù¬234Ù¬567Ù«12
Parsed Number result field should display 1234567.12
see screenshot for reference




Ah yeah thats because in Arabic the period is a different character. You would need an arabic keyboard to type it. So i think this is fine to ignore for now. @jbrcna
Thanks @tmcconechy .
I agree , I way over thought that :)