add escape buttono to close the popup

This commit is contained in:
Ashley //// 2024-04-27 18:31:05 +00:00
parent 2e7a43ad7c
commit 312f717713

View file

@ -1678,6 +1678,12 @@ document.getElementById('search').addEventListener('keyup', function () {
event.preventDefault();
togglePopup();
});
document.addEventListener('keydown', function (event) {
if (event.key === 'Escape' && isPopupOpen) {
closePopup();
}
});
// @license-end
</script>