hide modal on escape
This commit is contained in:
parent
7b939cfd8f
commit
0016ef97bb
@ -380,6 +380,13 @@ modal.addEventListener('click', (e) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Close modal when pressing escape
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('show')) {
|
||||
hideModal();
|
||||
}
|
||||
});
|
||||
|
||||
confirmButton.addEventListener('click', async () => {
|
||||
const url = document.getElementById('feedUrl').value.trim();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user