Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Broken functionality] Entering currency amount in cs_CZ locale does not behave correctly #7537

Open
weinfurt opened this issue Sep 12, 2024 · 1 comment
Labels
type: bug Existing functionality is broken

Comments

@weinfurt
Copy link

weinfurt commented Sep 12, 2024

User Story

I am using GiveWP plugin in the Czech Republic (cs_CZ locale) and currency is CZK (Czech Koruna) which is placed after the amount value. I'd like to type in the desired amount normally (digit by digit) without any issues.

Details

Currently, when I type in first digit, then the cursor immediately moves to the end of the input field string. That is after the "Kč" currency label. Then next digit pressed immediately generates NaN error.
Other weird issue is, that when I enter the currency field with some value already there (like the predefined amounts in the Builder), and then just leave the field by clicking elsewhere, the field value is updated with extra "000" ... so from "1 000 Kč" string is suddenly "1 000 000 Kč". The same happens when pressing Delete button.
I've seen this behavior so far in the Builder under the Donation Options and also in the Custom Amount field

Expected Behavior

The currency input fields should work correctly in all locales no matter if the currency name is before or after the value.

Steps to Reproduce

Use the latest Give WP plugin with the locale where its currency name is after the value. In my case it is czech locale (cs_CZ).

Visuals

Zaznam.obrazovky.2024-09-12.180443.mp4

Additional Context

System Information

Details

Give WP 3.16.1

@weinfurt weinfurt added the type: bug Existing functionality is broken label Sep 12, 2024
@dvlprlat
Copy link

dvlprlat commented Oct 3, 2024

I'm getting the same error, but 6 zeros are added at the end of any amount. So if someone's trying to donate 100 USD the field will be updated with 6 additional zeros resulting in 100,000,000. I've been trying to debug the issue, deactivating all of my other plugins, changing theme and nothing seems to be working. Help please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Existing functionality is broken
Projects
None yet
Development

No branches or pull requests

2 participants