3 ms·
I see more and more website use multiple inputs with JavaScript to handle automatically moving from one to the other for OTP codes, including GitHub. It's alway
by notresidenter 2y ago
I see more and more website use multiple inputs with JavaScript to handle automatically moving from one to the other for OTP codes, including GitHub. It's always buggy because the devs reimplement basic navigation (focus, deletion, arrow keys, etc.) and it turns out that stuff is hard to get right, so they get it wrong. Often, just typing too fast breaks those inputs (<https://github.com/login/device/ https://github.com/login/device/> for example).
A simple input is much better, even at the cost of a UI that is slightly more ambigous for the user on desktop (on mobile, there's a bagillion things to make inputting OTP codes easy).
- haolez 2y agoYeah, I think basic input with some magic when using "paste" from different source formats is the way to go.