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 suffix block entering fraction digits in field #14769

Open
bartez opened this issue Feb 8, 2024 · 4 comments
Open

InputNumber suffix block entering fraction digits in field #14769

bartez opened this issue Feb 8, 2024 · 4 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@bartez
Copy link

bartez commented Feb 8, 2024

Describe the bug

When I provide suffix for input number with mode=decimal then I cannot provide fraction digits. After enter dot and provide fraction digit the field will cleared.

<p-inputNumber suffix="Mg" mode="decimal" [maxFractionDigits]="5">

But when I set minFractionDigits more than 0 then problem is gone.

<p-inputNumber suffix="Mg" mode="decimal" [minFractionDigits]="2" [maxFractionDigits]="5">

Environment

Error repeated regardless of environment settings. Also repeats on sample code in documentation

Reproducer

https://stackblitz.com/edit/gv83do?file=src%2Fapp%2Fdemo%2Finput-number-numerals-demo.html

Angular version

17.0.9

PrimeNG version

17.6.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.10.0

Browser(s)

Chrome 121

Steps to reproduce the behavior

  1. Try enter value with fraction digits eg. 1.234 in field is
  2. After enter dot and number will clear form value.

The sample video describing steps:
https://github.com/primefaces/primeng/assets/1591522/8fa99b46-ca8d-4a09-af2d-14550c9b1737

Expected behavior

Values after the decimal point should be able to be entered.

@bartez bartez added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 8, 2024
@erber014
Copy link

Hi, I can confirm I have the same issue. There is an issue when mode="currency" also as the currency mode uses prefixes/suffixes
#14227

@ldesgrange
Copy link

ldesgrange commented Jun 21, 2024

This seems to be a recurrent breakage:

@KevinHetzelGFL
Copy link

Same issue in 17.18.2

@tarockx
Copy link

tarockx commented Sep 3, 2024

Using v17.18.9 and I can confirm the issue is still present: if minFractionDigits is set to 0 and you use a suffix typing the number correctly is almost impossible, the cursor starts jumping around or not responding at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

5 participants