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

custom onKeyDown event on Dialog overrides default behavior #33616

Closed
dimon82 opened this issue Jul 22, 2022 · 2 comments
Closed

custom onKeyDown event on Dialog overrides default behavior #33616

dimon82 opened this issue Jul 22, 2022 · 2 comments
Assignees
Labels
component: dialog This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information

Comments

@dimon82
Copy link

dimon82 commented Jul 22, 2022

Hi there, I'm trying to add some extra functionality for Dialog element based on keyboard keys, basically to handle some of them in onKeyDown event. But when I add my handler, the default functionality is not triggered. I.e. pressing Escape doesn't close it. Is there a way for me to handle additional keyboard keys for Dialog while keeping the default onKeyDown functionality (i.e. Escape)?

@michaldudak michaldudak added status: waiting for maintainer These issues haven't been looked at yet by a maintainer component: dialog This is the name of the generic UI component, not the React module! labels Oct 11, 2022
@ZeeshanTamboli
Copy link
Member

I am able to close the Dialog using Esc key even if custom onKeyDown event handler is present. See https://codesandbox.io/s/clever-pasteur-ve354f?file=/src/App.tsx.

Please provide a CodeSandbox reproducing the issue. The issue template is a good starting point.

@ZeeshanTamboli ZeeshanTamboli added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 19, 2022
@github-actions
Copy link

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dialog This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

4 participants