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: value set to null when second digit with cursor behind initial value is entered #5735

Open
mr-t-Durden opened this issue May 14, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@mr-t-Durden
Copy link

Describe the bug

The bug appears in the InputNumber component under the following conditions:

  • suffix is present
  • initial value is 0

When the reproductions steps below are followed, the input value will be set to null.

versions used:
"nuxt-primevue": "^0.3.1",
"primeicons": "^7.0.0",
"primevue": "^3.52.0"

For all who suffer from this bug: using highlight-on-focus in the InputNumber component may mitigate the effect of this bug.

Reproducer

https://stackblitz.com/edit/primevue-nuxt-issue-template-8scsch?file=app.vue

PrimeVue version

3.52.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

  1. click in the InputNumber field so that the cursor is right behind the (initial set) 0 value and before the suffix
  2. type one and see the value appearing as expected
  3. type zero --> placeholder is shown (value set to null)

Expected behavior

10 is set as value of the input field

@mr-t-Durden mr-t-Durden added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 14, 2024
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

1 participant