Skip to content

Inconsistent behavior when replacing input value with decimal point in InputNumber #8252

@dacapoo

Description

@dacapoo

Title:

Hello Everyone 👋

I noticed an inconsistency in the InputNumber component when handling replacement of values with the decimal point (.).

Steps to reproduce

  1. Type a number in the input (e.g. 123).
  2. Select the entire number.
  3. Press . (decimal point).
  4. The input gets cleared (empty).
  5. Press . again → now the input becomes 0.00.

Expected behavior

When selecting an existing value and pressing dot "." or "," (depends on the numbers system) , the field should immediately be replaced with 0.00 (similar to how selecting a number and typing another digit replaces the entire input).

This would make the behavior consistent with how other characters/digits work when replacing a selected value.

Current behavior

First press of "." clears the input.

Only after pressing . again does it add 0.00.

Why this matters

It is inconsistent compared to typing a number after selecting text.

Suggested improvement

When the entire input is selected and . is pressed:

Replace the content with 0.00x immediately (instead of clearing first).

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