I want to close modal by clicking on the background BUT not be closed by pressing ESC.
I found this code.
if (this.clickToClose) {
window.addEventListener('keyup', this.handleEscapeKeyUp)
}
Can provide something like closeOnPressEscape instead of it ? Thanks.
1.3.33
I have checked stackoverflow for solutions and 100% sure that this issue is not not related to my code.
Closing modals through escape is w3c requirement for a11y, see here in the keyboard support section: https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html
I use codemirror.js in the modal and use escape to exit full-screen editing. Modal was also closed together. Is there any way to solve this problem?
I am also interested in this feature. I have some rare cases, like wait dialogs, which should not be closed by ESC key.
Is it possible to:
If this is approved, I can try to implement this feature and make a pull request.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I also need the property @avmalyutin mentioned above. My use case is showing a modal while an ajax request finishes. I don't want users interacting with the page before the request finishes or times out. Does anyone have any workarounds?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed.
Feature Request:
I need closeOnPressEscape and closeOnClickBackground properties.
These props might be boolean type and the default is true.
Most helpful comment
I am also interested in this feature. I have some rare cases, like wait dialogs, which should not be closed by ESC key.
Is it possible to:
If this is approved, I can try to implement this feature and make a pull request.