feat(reader): add keyboard navigation with settings toggle#133
Conversation
Enable arrow keys and j/k to move between entries in the reader, with an appearance setting to turn it off and merged user settings updates. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16042c9a2f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ( | ||
| target.tagName === 'INPUT' || | ||
| target.tagName === 'TEXTAREA' || | ||
| target.isContentEditable | ||
| ) { |
There was a problem hiding this comment.
Ignore keyboard events from focused controls
When focus is on ReaderPage controls that are not inputs, such as the filter DropdownMenu trigger/items, ArrowUp/ArrowDown events can still bubble to this document handler because only inputs, textareas, and contenteditable targets are excluded. In that state, using the menu's normal keyboard navigation also selects the previous/next article and calls preventDefault, so keyboard users cannot reliably operate the filter menu or other focused buttons without unexpectedly changing the current entry.
Useful? React with 👍 / 👎.
…rols Arrow keys no longer hijack entry navigation when focus is on a button, link, select, or any element inside an ARIA widget (menu, listbox, combobox, dialog, etc.), allowing filter dropdowns and other controls to handle their own keyboard events without interference. Co-authored-by: Cursor <cursoragent@cursor.com>
Enable arrow keys and j/k to move between entries in the reader, with an appearance setting to turn it off and merged user settings updates.
Originally purposed in #117 and credits to @GoToBoy.