Skip to content

The arrow keys keep the hover while the list scrolls under the pointer - #156

Merged
Gherkin merged 1 commit into
mainfrom
fix-scroll-hover-walk
Oct 28, 2026
Merged

Gherkin merged 1 commit into
mainfrom
fix-scroll-hover-walk

Conversation

@Gherkin

@Gherkin Gherkin commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to the review of 6279c5d on #155.

Closes #155

With the pointer resting over the part list, the arrow keys no longer walked the list. When the list scrolls, the browser fires mouseenter/mouseleave on the rows that pass under the still pointer. These counted as mouse use, dropped the focus row, and the next press started again from the selected row.

Change

  • web/app.js: a mousemove listener stores the pointer position. navigateList calls takeHoverByKeys, which records the position at the key press. While the keys own the hover, a mouse enter or leave at that same position is ignored. An event at another position hands the hover to the mouse, as before.
  • The mouse handlers pass their event to hoverFootprint, hoverNet and hoverClear. Clicks, Enter and Escape call hoverClear() with no event, so they still end the walk.
  • New test: "the arrow keys walk the part list with the pointer resting on it". It fails on main (no focus row after 15 presses) and passes here.

Checks

  • npm run test:api: all OK.
  • Full browser suite: 172 of 173 passed. The known flaky "an inner layer checkbox changes both sides" timed out and passed alone.
  • Only tested in Chromium.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK

When the part list scrolls under a still pointer, the browser fires
mouseenter and mouseleave on the rows that pass under it. Since the last
used input owns the hover, these ended the arrow-key walk on every press.
A mouse event now takes the hover from the keys only if the pointer is at
another position than at the key press.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-28 17:28 UTC

@Gherkin

Gherkin commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

Review round 1: no findings.

FYI, not fixing: web/app.js:681 lastPointerPos stays null until the first mousemove. If the pointer has rested on the list since page load, keyPointerPos is null and the first scroll-driven mouseenter still takes the hover. Rare (a click on the list moves the mouse first), and closing it means choosing another event source, so left as is.

@Gherkin
Gherkin merged commit ac2c9f7 into main Oct 28, 2026
10 checks passed
@Gherkin
Gherkin deleted the fix-scroll-hover-walk branch October 28, 2026 17:27
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.

Unreviewed hover-ownership change merged with #154

1 participant