primereact icon indicating copy to clipboard operation
primereact copied to clipboard

InputNumber: Value typed by the user is not entered, when suffix used

Open VentuzVictorPerez opened this issue 2 years ago • 2 comments

Describe the bug

The value typed by the user is not entered, when the InputNumber uses a suffix, and the user has selected all the previous value by double clicking on it.

This is a problem because it hinders quick editing such as double clicking on the value or selecting the whole number (where, by the way, the space is also selectable and reproduces the same error we are talking about) especially in forms that involve many InputNumbers.

This is easily reproducible on the Prime React InputNumber page.

Reproducer

https://www.primefaces.org/primereact/inputnumber/

PrimeReact version

6.6.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. The InputNumber uses a suffix and has a previously entered value, such as:

image

  1. The value is selected by doubling clicking on it (notice that the empty space between the number and the suffix is also selected).

image

  1. The user types a number (like 3) with the intention of replacing the current value, the following happens:
  • The selection is deleted
  • The number 3 is not entered.

(This is the bug)

image

  1. The user needs to retype the 3 for it to work.

image

Expected behavior

The InputNumber must enter the typed value after a double-click selection.

VentuzVictorPerez avatar Jul 04 '22 15:07 VentuzVictorPerez

Similar to this other suffix related issue: https://github.com/primefaces/primereact/issues/2871

melloware avatar Jul 05 '22 12:07 melloware

Hello.

Is there any update on this?

VentuzVictorPerez avatar Sep 19 '22 11:09 VentuzVictorPerez