1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 00:14:39 -05:00

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>