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

[BUG] - onClick handler is not triggered when activating <Button> with keyboard. #3425

Closed
wasimakram-mulla opened this issue Jul 7, 2024 · 6 comments

Comments

@wasimakram-mulla
Copy link

NextUI Version

2.4.2

Describe the bug

As a generic button, the button clicks should be triggered on Spacebars and Enters when onFocus.

"@nextui-org/react": "^2.4.2",

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Go to any page with component.
Set focus on (for example, by tabbing).
Press Spacebar or Enter key.
onClick handler is not triggered, however button shows ":active" state.
Expected behavior
onClick handler is triggered as it normally happens for element in React.

Expected behavior

onClick handler is triggered as it normally happens for

element in React.

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

Copy link

linear bot commented Jul 7, 2024

ENG-1118 [BUG] - onClick handler is not triggered when activating <Button> with keyboard.

@wasimakram-mulla
Copy link
Author

Similar discussion was abruptly closed before without any solution #426
But the issue still persists and is a BLOCKER for me now

@wasimakram-mulla
Copy link
Author

@wingkwong
Copy link
Member

  1. The linear link is for internal use. You can ignore it.
  2. onClick is deprecated. Please use onPress instead.

@wingkwong wingkwong closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2024
@ynchen2829
Copy link

  1. The linear link is for internal use. You can ignore it.
  2. onClick is deprecated. Please use onPress instead.

@wingkwong For future iterations, Is it possible to show a deprecated message when hovering over onClick?

@wingkwong
Copy link
Member

I remember i've seen in code. need to double check tho. they will be removed eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants