Disable confirming the modal with enter/space key?
See original GitHub issueI would like to disable the confirm action of the modal from enter
/space
keys. What is the best way to do this?
Our use case is: users are performing an action by holding down the space
key which can trigger a modal. This modal is then immediately dismissed before the user can even see it. This did not occur in the original version of sweetalert (we’ve just upgraded to sweetalert2.)
I see there is a allowEscapeKey
property but, for exampe, no allowEnterKey
.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Avoid modal dismiss on enter keypress - Stack Overflow
I tried activating the modal with keyboard:false, but that only prevents dismissal with the ESC key. forms · twitter-bootstrap · modal-dialog · Share....
Read more >Dialog widget (or: modal, popup, lightbox, overlay, alert) - ADG
The dialog's last element is a "Confirm" button. Upon clicking it, the dialog is closed and focus is set on the dialog toggler...
Read more >Modal - Bootstrap
Modals are built with HTML, CSS, and JavaScript. · Clicking on the modal “backdrop” will automatically close the modal. · Bootstrap only supports...
Read more >Modal - dbc docs - Dash Bootstrap Components - Faculty AI
By default, the modal can be dismissed by clicking outside the modal, clicking the close button in the header, or by pressing the...
Read more >Modal | Block Editor Handbook
Dismissing modals · Tapping outside of the modal · Tapping the “Cancel” button · Tapping the “Close” icon button, or pressing the esc...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hy I am still facing issue in allowEscapeKey Please help me
Fixed in v6.4.1 🎉