hide modal on escape

This commit is contained in:
Greg Shuflin 2025-02-05 04:40:01 -08:00
parent 7b939cfd8f
commit 0016ef97bb

View File

@ -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();