Skip to content

Commit

Permalink
Fix #6317 InputOtp
Browse files Browse the repository at this point in the history
Handles iOS/macOS one-time-code autocomplete CustomEvent vs. InputEvent
  • Loading branch information
brtinney authored Oct 17, 2024
1 parent 69d0407 commit d8261d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/primevue/src/inputotp/InputOtp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default {
this.moveToPrev(event);
} else if (event.inputType === 'insertText' || event.inputType === 'deleteContentForward') {
this.moveToNext(event);
} else if (event instanceof CustomEvent) {
// iOS/macOS one-time-code autocomplete uses CustomEvent vs. InputEvent for each character in the code
// If moveToNext is not called, it will continue to append the next value after the first character
this.moveToNext(event);
}
},
updateModel(event) {
Expand Down

0 comments on commit d8261d5

Please sign in to comment.