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

Fix issue with ^ and ¨ #6

Closed bluepioupiou closed 4 years ago

bluepioupiou commented 4 years ago

fix issue #5

soywod commented 4 years ago

I will first merge #3, then I will take care of your fix. Thank you :)

soywod commented 4 years ago

Your fix does not seem to work for me, since I don't receive Unidentified but Dead (which refers to dead key I guess).

bluepioupiou commented 4 years ago

Do I add Dead to my cases and let Unidentified since this one works for me ?

soywod commented 4 years ago

Yes :)

soywod commented 4 years ago

Could you also pull? I set up git hooks to prevent pushing code with lint errors.

bluepioupiou commented 4 years ago

done, good idea husky

soywod commented 4 years ago

Still have the issue with Firefox from your branch :man_facepalming: it's a pain this issue!

image

bluepioupiou commented 4 years ago

Yeah, I know, I have a gift to find painful issues... sorry. Will try with FF

bluepioupiou commented 4 years ago

It's working for me (but was before so...) what's your OS and version of FF ?

soywod commented 4 years ago

69.0.2 (64-bit). I think I have an idea on how to handle, I'll propose sth ASAP.

soywod commented 4 years ago

I modified directly your branch, seems to fix. I kept your idea to add Unidentified and Dead to the key stack. In fact I moved the logic from the handleKeyDown to the useEffect. Now, every key (except Enter and Tab) are sent to the stack, and processed in the useEffect. Thanks for your help :)