Skip to content

Conversation

joeyslater
Copy link

current state:

  • onKeyDown points to onLinkPressed -> handleNavigation which swallows the original onKeyDown.
  • onClick is properly passed to onLinkPressed -> handleNavigation

pr state:

  • passes onKeyDown to handleNavigation (which one could argue we should handle in the Link component itself, but that was a little bit bigger of a refactor - which I can do if the team wants); when the key is not Enter, the onKeyDown will be fired.

Copy link

changeset-bot bot commented Jun 3, 2025

🦋 Changeset detected

Latest commit: 476aae1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-resource-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -103,6 +104,7 @@ const Link = forwardRef<HTMLButtonElement | HTMLAnchorElement, LinkProps>(
const handleLinkPress = (e: MouseEvent | KeyboardEvent) =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Given this is immediately split into keyboard vs non-keyboard inside handleNavigation, might as well just fully split this into two different things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants