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

DataTable: NumpadEnter ignored during cell editing (and many other cases) #6023

Closed
inad9300 opened this issue Feb 21, 2024 · 0 comments · Fixed by #6025
Closed

DataTable: NumpadEnter ignored during cell editing (and many other cases) #6023

inad9300 opened this issue Feb 21, 2024 · 0 comments · Fixed by #6025
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@inad9300
Copy link
Contributor

Describe the bug

KeyboardEvent.code can take the value "Enter" or "NumpadEnter" when hitting the respective enter keys. KeyboardEvent.key is "Enter" in both cases. If code is used, both values should be checked; otherwise, key should be used.

There are many examples of incorrect handling of the enter key, such as:

if (event.code === 'Enter' || event.code === 'Tab') {

if (event.code === 'Enter' || event.code === 'Space') {

if (event.code === 'Enter' || event.code === 'Space') {

if (event.code === 'Enter' || event.code === 'Backspace') {

You can see more cases searching by 'Enter', quotes included: https://github.com/search?q=repo%3Aprimefaces%2Fprimereact+%27Enter%27&type=code.

Reproducer

No response

PrimeReact version

10.5.1

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@inad9300 inad9300 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 21, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 21, 2024
@melloware melloware self-assigned this Feb 21, 2024
@melloware melloware added this to the 10.5.2 milestone Feb 21, 2024
melloware added a commit to melloware/primereact that referenced this issue Feb 21, 2024
melloware added a commit to melloware/primereact that referenced this issue Feb 21, 2024
@gucal gucal modified the milestones: 10.5.2, 10.6.0 Mar 19, 2024
mertsincan pushed a commit that referenced this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants