question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable confirming the modal with enter/space key?

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
narender2031commented, Oct 19, 2018

Hy I am still facing issue in allowEscapeKey Please help me

1reaction
limontecommented, Feb 14, 2017

Fixed in v6.4.1 🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found