mirror of
https://codeberg.org/ashley/poke
synced 2025-04-06 09:38:00 +00:00
add escape buttono to close the popup
This commit is contained in:
parent
2e7a43ad7c
commit
312f717713
@ -1678,6 +1678,12 @@ document.getElementById('search').addEventListener('keyup', function () {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
togglePopup();
|
togglePopup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.addEventListener('keydown', function (event) {
|
||||||
|
if (event.key === 'Escape' && isPopupOpen) {
|
||||||
|
closePopup();
|
||||||
|
}
|
||||||
|
});
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user