Merge pull request #2566 from keepassxreboot/fix/query_form_on_savedform_check

Query form on savedForms check
This commit is contained in:
Sami Vänttinen 2025-05-30 22:07:01 +03:00 committed by GitHub
commit dac9ceceff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,7 +48,12 @@ kpxcForm.formIdentified = function(form) {
kpxcForm.getCredentialFieldsFromForm = function(form) {
for (const savedForm of kpxcForm.savedForms) {
if (savedForm.form === form) {
return [ savedForm.username, savedForm.password, savedForm.passwordInputs, savedForm.totp ];
// If savedForm has no values, query the form instead
return [
savedForm.username || form?.querySelector('input[type=text]'),
savedForm.password || form?.querySelector('input[type=password]'),
savedForm.passwordInputs,
savedForm.totp ];
}
}