mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 15:57:52 +01:00
add escape buttono to close the popup
This commit is contained in:
parent
2e7a43ad7c
commit
312f717713
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue