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

InputNumber: Cursor stuck when using minFractionDigits and comma as decimal separator #5548

Closed
rcauler opened this issue Dec 7, 2023 · 1 comment · Fixed by #5608 or #5718
Closed
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@rcauler
Copy link

rcauler commented Dec 7, 2023

Describe the bug

When using the InputNumber component with minFractionDigits set to 2 or more, and a locale that uses a comma as a decimal separator, the cursor gets stuck on the first character when setting the decimal value.

Reproducer

https://codesandbox.io/p/sandbox/primereact-demo-forked-5cs9lm

PrimeReact version

10.2.1

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

  1. Set minFractionDigits to 2 or more in InputNumber component
  2. Set locale to one that uses comma as decimal separator. Eg: de-DE, pt-BR
  3. Try to set a decimal value
  4. See error

Expected behavior

The cursor should move freely, allowing the user to input decimal values without any hindrance.

@rcauler rcauler added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 7, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 7, 2023
@melloware melloware changed the title Bug in InputNumber component: Cursor stuck when using minFractionDigits and comma as decimal separator InputNumber: Cursor stuck when using minFractionDigits and comma as decimal separator Dec 7, 2023
@alanmdiniz
Copy link

I also have this serious problem, any workaround?

@melloware melloware added this to the 10.2.2 milestone Dec 18, 2023
melloware added a commit to melloware/primereact that referenced this issue Jan 9, 2024
melloware added a commit that referenced this issue Jan 9, 2024
* Fix #5537 InputNumber text focus

* Fix #5548
Fix #5589
Fix #5607

* fix:InputNumber: Value pasted by the user is not entered when suffix and decimals are used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants