From b6a7e5adc5675818a98274be3db3db3f5e590f3c Mon Sep 17 00:00:00 2001 From: SonTT19 Date: Mon, 15 Jul 2024 11:48:42 +0700 Subject: [PATCH] fix(VOtpInput): slice value on paste --- packages/vuetify/src/components/VOtpInput/VOtpInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vuetify/src/components/VOtpInput/VOtpInput.tsx b/packages/vuetify/src/components/VOtpInput/VOtpInput.tsx index f1b59a088df..fac9e739a33 100644 --- a/packages/vuetify/src/components/VOtpInput/VOtpInput.tsx +++ b/packages/vuetify/src/components/VOtpInput/VOtpInput.tsx @@ -166,7 +166,7 @@ export const VOtpInput = genericComponent()({ e.preventDefault() e.stopPropagation() - const clipboardText = e?.clipboardData?.getData('Text') ?? '' + const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '' if (isValidNumber(clipboardText)) return