Merge pull request #1396 from keepassxreboot/fix/segmented_totp_for_text

Fix segmented TOTP with text type
This commit is contained in:
Sami Vänttinen 2021-08-23 13:09:05 +03:00 committed by GitHub
commit c956f41c90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -419,6 +419,7 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
// Use the form's elements
addTotpFieldsToCombination(form.elements);
} else if (inputs.length === 6 && inputs.every(i => (i.inputMode === 'numeric' && i.pattern.includes('0-9'))
|| (i.type === 'text' && i.maxLength == 1)
|| i.type === 'tel')) {
// No form is found, but input fields are possibly segmented TOTP fields
addTotpFieldsToCombination(inputs);