Use KeyboardEvent.key instead of the deprecated KeyboardEvent.which and/or KeyboardEvent.keyCode.
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57
I initially filed a bug with @testing-library/userEvent, but they suggested to move it to PrimeReact.
Original issue: testing-library/user-event#684
And the suggested changes where mentioned here https://github.com/testing-library/user-event/issues/684#issuecomment-857498379
Current behavior userEvent.type() doesn't work with InputNumber with decimal inputs
Expected behavior userEvent.type() should work with InputNumber with decimal inputs
Minimal reproduction of the problem with instructions Codesandbox: https://codesandbox.io/s/gallant-ishizaka-hv4n7?file=/src/aaa.test.js
Please tell us about your environment: Any
-
**React version:**17.0.0
-
PrimeReact version: 6.3.2
-
Browser: All
-
Language: All
Hello Ankit,
I think the reason why your test case fails is due to the decimal separator in InputNumber being "," (comma) and not "." When I ran your test case with "18,27", the test passes.
Kind regards
I don't think I have provided the decimal separator as ,. Moreover, the locale locale="en-IN" should not use a decimal separator as a comma anyway.
The test case on the test tabs still shows a failed test


What I meant was to change the dot to a comma in the test variable
Should this be closed since it was basically an invalid test?
Also PrimeReact can't drop keyCode or which as it still supports IE11 and IE does not fully support key. See: https://stackoverflow.com/a/4471635/502366
I think now that IE is dead this ticket should be implemented.
Here is a great Keyboard event viewer: https://w3c.github.io/uievents/tools/key-event-viewer.html
Also its universally supported now: https://caniuse.com/?search=event.key
Issue tracker is used for defects only as part of our commitment to quality and continuous improvement in all areas. Enhancements are collected as valuable community feedback and managed internally so moving this enhancement ticket to our internal project management backlog.