Skip to content

Commit

Permalink
Merge pull request #522 from mickaobrien/timeline-enter-keyboard-shor…
Browse files Browse the repository at this point in the history
…tcut-fix

Fix `enter` keyboard shortcut on timeline
  • Loading branch information
cheeaun committed Apr 28, 2024
2 parents 7376cb1 + 5ae2058 commit 044f754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ function Timeline({

const oRef = useHotkeys(['enter', 'o'], () => {
// open active status
const activeItem = document.activeElement.closest(itemsSelector);
if (activeItem) {
const activeItem = document.activeElement;
if (activeItem?.matches(itemsSelector)) {
activeItem.click();
}
});
Expand Down

0 comments on commit 044f754

Please sign in to comment.