From d8261d5300d1741fb6e30abd3de9371cacccbb11 Mon Sep 17 00:00:00 2001 From: Bradley Tinney Date: Thu, 17 Oct 2024 12:15:09 -0400 Subject: [PATCH] Fix #6317 InputOtp Handles iOS/macOS one-time-code autocomplete CustomEvent vs. InputEvent --- packages/primevue/src/inputotp/InputOtp.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/primevue/src/inputotp/InputOtp.vue b/packages/primevue/src/inputotp/InputOtp.vue index 842becfdd..8a3ae7d90 100755 --- a/packages/primevue/src/inputotp/InputOtp.vue +++ b/packages/primevue/src/inputotp/InputOtp.vue @@ -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) {