soywod / react-pin-field

📟 React component for entering PIN codes.
https://soywod.github.io/react-pin-field/
MIT License
413 stars 24 forks source link

Prevent modifier keys (Alt, OS, Ctrl...) to be blocked #10

Closed soywod closed 4 years ago

soywod commented 4 years ago

For eg, Alt+<num> is used by browsers to change tab. Alt+1 for the first, Alt+2 for the second etc. When the field has the focus, you can't anymore use these binds. Instead of switching the tab, it inserts the number.

soywod commented 4 years ago

Fixed with d824a46450b939bb23f2332fbd2eacd9f12fb125: https://github.com/soywod/react-pin-field/blob/d824a46450b939bb23f2332fbd2eacd9f12fb125/src/pin-field.tsx#L153