Skip to content

Commit

Permalink
fix(VOtpInput): slice value with length on paste (#20164)
Browse files Browse the repository at this point in the history
fixes #20158
  • Loading branch information
SonTT19 committed Jul 16, 2024
1 parent e33b951 commit 0f8fd5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VOtpInput/VOtpInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const VOtpInput = genericComponent<VOtpInputSlots>()({
e.preventDefault()
e.stopPropagation()

const clipboardText = e?.clipboardData?.getData('Text') ?? ''
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? ''

if (isValidNumber(clipboardText)) return

Expand Down

0 comments on commit 0f8fd5d

Please sign in to comment.