Merge pull request #2521 from keepassxreboot/feature/support_autocomplete_username

Add support for autocomplete=username
This commit is contained in:
Sami Vänttinen 2025-04-18 17:03:24 +03:00 committed by GitHub
commit a5e7444f35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,7 +46,11 @@ kpxcFields.getAllCombinations = async function(inputs) {
}
}
if (kpxc.singleInputEnabledForPage && combinations.length === 0 && usernameField) {
// Allow single input if autocomplete="username" is present, or Username-Only Detection is enabled for the page
const autoComplete = usernameField?.getLowerCaseAttribute('autocomplete');
if (combinations.length === 0 && usernameField &&
(kpxc.singleInputEnabledForPage || autoComplete?.includes('username') || autoComplete?.includes('email'))
) {
const combination = {
username: usernameField,
password: null,