Close modal with bg click or escape key
This commit is contained in:
parent
603769d5fd
commit
e54db3c4eb
2 changed files with 7 additions and 1 deletions
|
@ -43,3 +43,9 @@ function closeAddRequestModal() {
|
|||
}
|
||||
|
||||
updateTable();
|
||||
|
||||
document.addEventListener("keydown", function onEvent(event) {
|
||||
if (event.key === "Escape") {
|
||||
closeAddRequestModal();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue