Skip to content

Commit

Permalink
use focus event
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs committed Dec 18, 2024
1 parent c14d418 commit 3b93b91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/@guardian/react-crossword/src/components/Clues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ export const Clues = ({ direction, Header }: Props) => {
const clues = cluesRef.current;

clues?.addEventListener('keydown', onKeyDown);
clues?.addEventListener('focusin', onFocus);
clues?.addEventListener('focus', onFocus);

return () => {
clues?.removeEventListener('keydown', onKeyDown);
clues?.removeEventListener('focusin', onFocus);
clues?.removeEventListener('focus', onFocus);
};
}, [onKeyDown, onFocus]);

Expand Down

0 comments on commit 3b93b91

Please sign in to comment.