Skip to content

feat(entry): jump to the bib field when a digit is typed - #437

Open
cartpauj wants to merge 2 commits into
developfrom
fix/426-bib-autofocus-on-type
Open

cartpauj wants to merge 2 commits into
developfrom
fix/426-bib-autofocus-on-type

Conversation

@cartpauj

Copy link
Copy Markdown
Contributor

Closes #426

What

On the entry page, typing a number while focus is somewhere else (a grid row, the In/Out buttons) now moves focus to the BIB# box. The digit lands there too, so no keystrokes are lost.

The existing autofocus only fires on page load and after a record is logged. Once the operator clicks anything else, typed digits went nowhere.

When it stays out of the way

  • Another text field is focused (grid filter, search, notes)
  • A column filter popup is open
  • Any modal or drawer is open, e.g. the edit panel (uses the backdrop state, now exposed on BackdropContext)
  • Ctrl/Cmd/Alt is held, so Ctrl+0 still resets grid font size

The listener is only mounted on the entry page.

Tests

bibAutoFocus.test.ts covers the key decision: all digits, non-digits, modifier shortcuts, and typing in another field. Tested manually in the app too.

README and the in-app Help page each get one sentence describing the behavior.

🤖 Generated with Claude Code

cartpauj and others added 2 commits September 28, 2026 08:38
Typing a number while focus is elsewhere on the entry page (a grid row,
a button) now moves focus to the BIB# box so the keystroke lands there.
Skipped while another text field, a column filter, or a modal/drawer is
open, and for Ctrl/Cmd/Alt shortcuts.

Closes #426

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cartpauj cartpauj self-assigned this Sep 28, 2026
@cartpauj
cartpauj requested a review from rleikis September 28, 2026 14:59
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.

Auto-focus on input field

1 participant