Add support for numeric pad
This commit is contained in:
parent
68cb630339
commit
1a1b31e8a0
@ -56,7 +56,8 @@ function OTPInput() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add new digit
|
// Add new digit
|
||||||
else if (event.keyCode >= 48 && event.keyCode <= 57) {
|
else if ((event.keyCode >= 48 && event.keyCode <= 57)
|
||||||
|
|| (event.keyCode >= 96 && event.keyCode <= 105)){
|
||||||
inputs[i].value = event.key;
|
inputs[i].value = event.key;
|
||||||
if (i !== inputs.length - 1)
|
if (i !== inputs.length - 1)
|
||||||
inputs[i + 1].focus();
|
inputs[i + 1].focus();
|
||||||
|
Loading…
Reference in New Issue
Block a user