primereact
primereact copied to clipboard
InputNumber: Value typed by the user is not entered, when suffix used
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
- The InputNumber uses a suffix and has a previously entered value, such as:
- The value is selected by doubling clicking on it (notice that the empty space between the number and the suffix is also selected).
- 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)
- The user needs to retype the 3 for it to work.
Expected behavior
The InputNumber must enter the typed value after a double-click selection.
Similar to this other suffix
related issue: https://github.com/primefaces/primereact/issues/2871
Hello.
Is there any update on this?