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 ecf1c11 commit 46a3fb7Copy full SHA for 46a3fb7
core/src/components/input-otp/input-otp.tsx
@@ -278,7 +278,13 @@ export class InputOTP implements ComponentInterface {
278
const { inputRefs, length, validKeys } = this;
279
280
event.preventDefault();
281
- const pastedText = event.clipboardData?.getData('text') || '';
+
282
+ const pastedText = event.clipboardData?.getData('text');
283
284
+ if (!pastedText) {
285
+ return;
286
+ }
287
288
const validChars = pastedText
289
.split('')
290
.filter((char) => validKeys.test(char.toLowerCase()))
0 commit comments