Skip to content

Commit

Permalink
fix(verification-code): fix input focus after pasting #3399
Browse files Browse the repository at this point in the history
  • Loading branch information
wagagaha committed Jan 10, 2025
1 parent 39b69d5 commit ac088c1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ export default defineComponent({
if (!text) return;

text.split('').forEach((char, i) => {
if (index + i >= props.length) return;
if (index + i >= props.length) {
handleFocus(props.length - 1);
return;
}

if (isFunction(props.formatter)) {
const result = props.formatter(
Expand Down

0 comments on commit ac088c1

Please sign in to comment.