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

Component: InputNumber with maxlength attribute #13704

Closed
deathDog420 opened this issue Sep 19, 2023 · 0 comments · Fixed by #13720
Closed

Component: InputNumber with maxlength attribute #13704

deathDog420 opened this issue Sep 19, 2023 · 0 comments · Fixed by #13720
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@deathDog420
Copy link

Describe the bug

When p-inputnumber has maxlength attribute and the max number of digits is entered, I can't select the whole number to overwrite it.

My code:
<p-inputNumber [useGrouping]="false" inputId="code" formControlName="code" maxlength="4"></p-inputNumber>

When I enter 4 digits into the input, then select them all and try to input another number to overwrite everything, nothing happens. If less than 4 digits are entered, everything works fine.

Environment

Angular application with PrimeNg.

Reproducer

No response

Angular version

16.2.3

PrimeNG version

16.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.14.0

Browser(s)

Chrome 116.0.5845.188

Steps to reproduce the behavior

  1. Create p-inputnumber input field.
  2. Set maxlength attribute on the field to 4.
  3. Enter 4 digits into the field.
  4. Select all digits.
  5. Try to enter a number to overwrite the digits in the field.

The digits should be overwritten by the new pressed number, but nothing happens.

Expected behavior

I expect the selected digits to be overwritten by new input from keyboard.

@deathDog420 deathDog420 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 19, 2023
@cetincakiroglu cetincakiroglu added this to the 17.13.0 milestone Mar 22, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants