We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7cc58e commit d00d1e4Copy full SHA for d00d1e4
src/index.tsx
@@ -125,7 +125,7 @@ const OTPInput = ({
125
126
const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
127
const otp = getOTPValue();
128
- if (event.code === 'Backspace') {
+ if ([event.code, event.key].includes('Backspace')) {
129
event.preventDefault();
130
changeCodeAtFocus('');
131
focusInput(activeInput - 1);
0 commit comments