Fix #6317 InputOtp

Handles iOS/macOS one-time-code autocomplete CustomEvent vs. InputEvent
pull/6596/head
Bradley Tinney 2024-10-17 12:15:09 -04:00 committed by GitHub
parent 69d0407fe6
commit d8261d5300
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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) {