Skip to content

NaN in InputNumber (in a Form with FormValue) when pressing meta+backspace #8411

@patrickschroeter

Description

@patrickschroeter

Describe the bug

When using an InputNumber in a Form with FormValue with currency formatting, pressing meta+backspace leads to NaN in the input field.

  <Form>
    <FormField name="price">
      <InputNumber mode="currency" currency="EUR" />
    </FormField>
  </Form>

Pull Request Link

#8410

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/mnu5mtyk?file=src%2FApp.vue

Environment

MacOS

Vue version

3.2.45

PrimeVue version

4.5.4

Node version

No response

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Click on the input field
  2. Insert any number > 0
  3. Press meta+backspace

Expected behavior

The input shows nothing (or 0 when allow-empty=false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions