InputNumber with maxlength attribute, decimal mode and fixed fraction digits won't overwrite decimals when maxlength is reached. #13868
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
When InputNumber has a set
maxlength
attribute, decimal mode and fixed fraction digits I cannot edit the decimals numbers. Number input example:If I enter 3 digits into the input, for example 123, the input will show 123.00. If I then press the "." character to move to decimals, the insertion point moves to the decimal part, but when I enter a number to edit the decimal nothing happens. It seems that because the maximum character length is reached (in this case 6 characters) the input just ignores new entries. The input looks at the character length of the formatted value (123.00 is 6 characters). I would expect the continued typing after the decimal point to change the decimals regardless of the fact that
maxlength
is reached, just as they would be overwritten before themaxlength
is reached.Perhaps this can be fixed along with #13704.
Environment
Angular application with PrimeNg.
Reproducer
No response
Angular version
16.2.7
PrimeNG version
16.4.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.14.0
Browser(s)
Chrome (v118.0.5993.70)
Steps to reproduce the behavior
Decimals should be overwritten just as they would be overwritten before the
maxlength
is reached.Expected behavior
I would expect the continued typing after the decimal point to overwrite the decimals regardless of the fact that
maxlength
is reached, just as they would be overwritten before themaxlength
is reached.The text was updated successfully, but these errors were encountered: