Skip to content

fix(input): stop mouse from overriding keyboard selection in lists#52

Merged
libersoft-org merged 1 commit into
mainfrom
fix/mouse-keyboard-hover
Jul 3, 2026
Merged

fix(input): stop mouse from overriding keyboard selection in lists#52
libersoft-org merged 1 commit into
mainfrom
fix/mouse-keyboard-hover

Conversation

@lukyrys

@lukyrys lukyrys commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Problem

During keyboard navigation in list views (file browser, download file list), the mouse interfered with the keyboard selection:

  • A row scrolling under a stationary cursor fires mouseover/mouseenter without any real movement, hijacking the keyboard-selected row.
  • The cursor only auto-hid after the idle delay, so it stayed visible during keyboard use.
  • A redundant per-row Enter handler could activate the mouse-focused row instead of the keyboard-selected one.

Fix

A single input-mode flag (mouseActive) in the global mouse manager:

  • keydown → mark mouse inactive + hide the cursor immediately
  • real mousemove/mousedown → mark active + show cursor
  • idle hide timeout → also mark inactive (cursor hidden ⟺ mouse inactive until the next real move)

Hover-driven selection (the manager's processHover and the per-component onmouseenter handlers in the file/download lists) now no-ops while the mouse is inactive, so a stationary cursor can no longer hijack the keyboard selection. Also drops the redundant per-row Enter handler in the file browser — the list area's central confirm handler already activates the selected row (removes an Enter dual-fire on the mouse-focused row).

Verification

  • bun run check (frontend): 0 errors, 478 files
  • Playwright against the dev server: hover-select, cursor-hide-on-keydown, hover-suppressed-during-keyboard, idle-timeout suppression, mouse re-activation, and Enter via the central handler all pass.

@lukyrys lukyrys force-pushed the fix/mouse-keyboard-hover branch from 39cf1e4 to b49d30a Compare June 22, 2026 19:55
@libersoft-org libersoft-org merged commit 01b6ad0 into main Jul 3, 2026
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