Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputNumber: Bug deprecated KeyCode Usage #5008

Closed
louia opened this issue Dec 28, 2023 · 2 comments · Fixed by #5418 or DallinAllred/ezanalytics#11
Closed

InputNumber: Bug deprecated KeyCode Usage #5008

louia opened this issue Dec 28, 2023 · 2 comments · Fixed by #5418 or DallinAllred/ezanalytics#11
Assignees
Labels
Component: Test Issue or pull request is related to Component Testing Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@louia
Copy link

louia commented Dec 28, 2023

Describe the bug

Bug Summary

The current implementation of the onInputKeyPress method in the InputNumber component of PrimeVue relies on the deprecated keyCode property, which is set to be removed in future browser versions. This poses a potential risk of unsupported behavior as modern libraries and tools may cease to support this deprecated property.

Issue Details

The usage of keyCode is deprecated and marked for removal, causing compatibility issues with modern libraries and testing tools. For instance, the testing library (testing-library/user-event) no longer supports keyCode, as highlighted in this related issue: testing-library/user-event#842. When attempting to test the InputNumber component using this library, the keyCode remains 0, and no event is emitted.

Reproducer

https://codesandbox.io/p/devbox/wizardly-framework-5vw3dy?file=%2Fsrc%2FApp.vue%3A15%2C10

PrimeVue version

3.45.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@louia louia added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 28, 2023
@louia louia changed the title InputNumber: Deprecated KeyCode Usage InputNumber: Bug deprecated KeyCode Usage Dec 28, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Component: Test Issue or pull request is related to Component Testing and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 5, 2024
@melloware
Copy link
Member

I noticed this in PrimeReact as well

@mertsincan
Copy link
Member

Thanks a lot for your report! I set a milestone for it. We'll update it before the milestone is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Issue or pull request is related to Component Testing Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
4 participants