Skip to content

fix: all keyboard repeat events for navigation#10322

Open
snowystinger wants to merge 3 commits into
mainfrom
fix-keyboard-repeat-events
Open

fix: all keyboard repeat events for navigation#10322
snowystinger wants to merge 3 commits into
mainfrom
fix-keyboard-repeat-events

Conversation

@snowystinger

Copy link
Copy Markdown
Member

Closes

found in testing

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Go to components and press and hold on various keyboard keys. If it's navigation related or step related, it should fire/move continuously as long as you are holding the key.

🧢 Your Project:

@rspbot

rspbot commented Jul 13, 2026

Copy link
Copy Markdown

@LFDanLu LFDanLu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

behavior looks good to me. I am slightly worried that there are other areas we missed/may miss in the future so I wonder if allowRepeats=true might be a better as a default? I guess either way we approach it we could miss bad behavior in the future but at least making it default to true makes it match behavior prior to the useKeyboard changes?

I don't feel super strongly either way tbh, just something I was mulling over

if ('setAnchorDate' in state) {
state.setAnchorDate(null);
}
return false; // TODO: is this really correct? or should it return true when we cancel and only propagate if there's nothing to do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

my gut feeling is that it should stop propagation if we are cancelling selection and should continue other wise

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ah, that was copied from before, I'll add it to my pr for the keyboard documentation so i don't drop your approval here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants