From 00b9a31b80c59e78ddec6625b4b54591cbcdcde1 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Sat, 3 Jul 2021 09:52:38 +0300 Subject: [PATCH] Fix filling TOTP on Apple login page --- keepassxc-browser/content/keepassxc-browser.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index 106eeb5..8955573 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -393,7 +393,10 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) { if (totpInputs.length === 6) { const combination = { form: form, - totpInputs: totpInputs + totpInputs: totpInputs, + username: null, + password: null, + passwordInputs: [] }; combinations.push(combination); @@ -415,7 +418,8 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) { || form.length === 6))) { // Use the form's elements addTotpFieldsToCombination(form.elements); - } else if (inputs.length === 6 && inputs.every(i => i.inputMode === 'numeric' && i.pattern.includes('0-9'))) { + } else if (inputs.length === 6 && inputs.every(i => (i.inputMode === 'numeric' && i.pattern.includes('0-9')) + || i.type === 'tel')) { // No form is found, but input fields are possibly segmented TOTP fields addTotpFieldsToCombination(inputs); }