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

Enter and Escape keys don't work in modals dialogs #473

Open
jnothman opened this issue Oct 28, 2021 · 2 comments
Open

Enter and Escape keys don't work in modals dialogs #473

jnothman opened this issue Oct 28, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jnothman
Copy link
Contributor

We are finding that pressing Escape and Enter on the keyboard does nothing when a modal dialog is open. Is this a known issue?

@ndobb ndobb added the enhancement New feature or request label Oct 28, 2021
@ndobb ndobb self-assigned this Oct 28, 2021
@ndobb
Copy link
Member

ndobb commented Oct 28, 2021

This is a great point regarding usability, thanks @jnothman. Currently the web client only listens for mouse clicks, rather than keyboard events. I'll add as an enhancement.

@jnothman
Copy link
Contributor Author

Also happy to make it an open source contribution, but am not highly familiar with the reactstrap context. The impression I get is that by default Escape should work, since keyboard=True; and perhaps its not working has something to do with toggle not being defined? But since the reactstrap Modal attribute descriptions appear nonexistent this is only a guess???

Issues like reactstrap/reactstrap#1281 imply to me that one way to get Enter (or other browser equivalent) working is to make sure that <Modal> includes a <form> with onsubmit defined as equivalent to the Primary button's click handler.

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

No branches or pull requests

2 participants