mirror of
https://github.com/bfloydd/streams.git
synced 2026-07-22 12:50:25 +00:00
esc clears the calendar
This commit is contained in:
parent
9f04947518
commit
41fc8a2083
1 changed files with 9 additions and 0 deletions
|
|
@ -200,6 +200,15 @@ export class CalendarComponent extends Component {
|
|||
this.toggleExpanded(collapsedView, expandedView);
|
||||
}
|
||||
});
|
||||
|
||||
// Add keyboard event listener for Escape key
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && this.expanded) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.toggleExpanded(collapsedView, expandedView);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private updateTodayButton() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue