diff --git a/static/js/app.js b/static/js/app.js index 5aedfa9..8eb4674 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -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();