Skip to content

Commit

Permalink
close on escape
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienR1 committed Mar 1, 2025
1 parent 4323e5f commit 8be4249
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/web/src/components/Calendar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ function shiftWeekday(weekday: number) {
});
}
});

document.addEventListener("keyup", function (event) {
if (event.code === "Escape") {
close();
}
});
</script>

<style>
Expand Down

0 comments on commit 8be4249

Please sign in to comment.