react-code-input icon indicating copy to clipboard operation
react-code-input copied to clipboard

Pasting in a PIN should move focus to the last digit

Open rhysforyou opened this issue 7 years ago • 1 comments

Right now pasting PINs works but, for example, pasting a four digit PIN into the first text input of a four digit input results in the second digit's input being focused. Ideally focus would move to the first empty input after the pasted content, or if all the inputs are filled out, the last one.

rhysforyou avatar Nov 15 '18 00:11 rhysforyou

i know this is three years later, but i updated the component to work this way (focus moves to the first empty input after the pasted content, or if all the inputs are filled out, the last one) on paste. i also published it to npm as @acusti/react-code-input if you want to try it out (npm i @acusti/react-code-input or yarn add @acusti/react-code-input).

acusti avatar Oct 15 '21 01:10 acusti