Merge pull request #578 from keepassxreboot/fix/focus_to_input_field

Focus to input field after keyboard fill
This commit is contained in:
Sami Vänttinen 2019-07-10 08:02:53 +03:00 committed by GitHub
commit c3a3030310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1110,7 +1110,13 @@ kpxc.fillInFromActiveElement = function(suppressWarnings, passOnly = false) {
const el = document.activeElement;
if (el.tagName.toLowerCase() !== 'input') {
if (kpxcFields.combinations.length > 0) {
kpxc.fillInCredentials(kpxcFields.combinations[0], false, suppressWarnings);
kpxc.fillInCredentials(kpxcFields.combinations[0], passOnly, suppressWarnings);
// Focus to the input field
const field = _f(passOnly ? kpxcFields.combinations[0].password : kpxcFields.combinations[0].username);
if (field) {
field.focus();
}
}
return;
}