fdfe1072d8
Two issues with the "Autorizzazione capoturno" modal: 1. Backspace and digits did not work in the username/password fields. The numpad component installs a window-level keydown handler (for the USB caliper / keyboard wedge) that preventDefault()s digits, Backspace, Enter etc. It swallowed those keys inside the modal inputs. Guard handleKeydown to ignore events whose target is an editable field (INPUT/TEXTAREA/SELECT/ contentEditable); the numpad has no text inputs of its own. 2. The modal kept the previous username/password: opening only set the flag, and closing via backdrop click did not clear the fields. Add openSupervisorModal()/closeSupervisorModal() that always reset username, password and error, and use them for every open (fermo_linea, fine_produzione, out_of_tolerance) and close (backdrop, Annulla). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>