Repository navigation
Keep keyboard navigation within the current menu - #104
Merged
liuliu-dev merged 2 commits intoOct 15, 2026
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix matches existing interaction boundaries and includes regression coverage for both directions.
0 open findings
What changed in this PR
Keeps arrow-key navigation within the current menu, preventing focus from getting stuck on items inside a closed nested menu.
Changes:
- Filters navigation candidates by their closest
<details>container. - Adds regression coverage for both navigation directions.
| File | Description |
|---|---|
test/test.js |
Tests navigation around a closed nested menu. |
src/index.ts |
Excludes nested-menu items from navigation candidates. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
liuliu-dev
approved these changes
Oct 15, 2026
liuliu-dev
left a comment
Contributor
There was a problem hiding this comment.
thanks for the fix and regression test ✨
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Arrow navigation can select an item inside a closed nested
<details-menu>. That item cannot receive focus, so moving between the parent menu's items gets stuck.Limit the navigation candidates to items whose closest
<details>is the current menu's container, matching the existing click handling boundary. The regression checks navigation in both directions around a closed nested menu.Validation: the regression failed before the fix; all 31 existing and new Mocha/Chai tests pass in real Chromium afterward. TypeScript and declarations pass. Tests reused compatible dependencies and ran directly rather than through Karma. The reused ESLint version reports existing innerHTML and formatting incompatibilities; with that rule disabled and trailing-comma settings matched to this repository, both changed files pass. Firefox and WebKit were not run.