printedparts stage 16: kiosk touch fixes from first hands-on use
Some checks failed
CI / backend (push) Successful in 1m44s
CI / naming (push) Successful in 1s
CI / frontend (push) Successful in 8s
CI / migrations-mysql (push) Failing after 8s

The tap-anywhere wedge refocus stole focus from the manual-entry field
the moment it was tapped - the handler now only reclaims focus from
dead space, never from a real control. Manual entry works without a
physical keyboard: badge entry uses the TouchKeypad (an SSO is
digits), and item lookup accepts bare digits resolved by row id - the
digits in a minted code are the id, which also keeps labels printed
under an older prefix scannable after the prefix changes.
This commit is contained in:
cproudlock
2026-07-17 09:04:52 -04:00
parent aa4bfcd41c
commit 4dfdb167d5
3 changed files with 64 additions and 17 deletions

View File

@@ -371,6 +371,20 @@ Two more field requests, and the plugin's FIRST incremental migration:
ACTIVE member of each selected role (role.users backref), deduped with
the user picks and free-text; settings page gains a role picker.
## Stage 16 (extension) - kiosk touch fixes from first hands-on use
First real touchscreen session found two problems worth their own stage:
1. Focus steal: the page's tap-anywhere handler refocused the hidden wedge
input, yanking focus out of the manual-entry field the moment it was
tapped. Guard the handler - never reclaim focus from INPUT/SELECT/
TEXTAREA/BUTTON/A targets, only from dead space.
2. No physical keyboard on a touchscreen: manual fallbacks now use the
TouchKeypad. Badge entry is digits (an SSO) so the keypad covers it;
item codes are letters+digits, solved server-side instead of building an
alphanumeric keyboard - the digits in a minted code ARE the row id, so
`/kiosk/item/<digits>` resolves bare digits by id. Bonus: labels printed
under an older code prefix keep working after the prefix changes.
---
## Where each pattern lives (cheat sheet)