mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 14:16:16 -08:00
fix(parental-lock): tell Enter in the PIN field from a click on Save
Moving on to an empty repeat was decided by document.activeElement in submit(). WebKit does not focus a clicked button, so a click on Save with the PIN field focused looked like Enter: focus moved and no error showed. The advance is now a keydown.enter handler on the PIN field that prevents the submission, and submit() refuses an empty repeat on every path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9d1f3d34fc
commit
24fcea999d
5 files changed
+52
-9
No files matched your search
@@ -429,7 +429,8 @@ so a cancelled or refused PIN leaves it showing the real state.
|
||||
disabled default button; `submit()` refuses instead, shakes the field
|
||||
(no shake under `prefers-reduced-motion: reduce`) and focuses it — except
|
||||
that Enter in the PIN field with the repeat still empty only moves focus
|
||||
to the repeat. Set
|
||||
to the repeat (a `keydown.enter` handler: focus cannot tell Enter from a
|
||||
click on Save, since WebKit does not focus a clicked button). Set
|
||||
mode marks both inputs `autocomplete="new-password"`. The Electron
|
||||
`parental-lock-pin-dialog.e2e.ts` covers the labels and the
|
||||
mismatch → fix → save flow.
|
||||
|
||||
Reference in new issue
Block a user