Merge pull request #1708 from keepassxreboot/fix/fill_after_reconnect

Fill after reconnect
This commit is contained in:
Sami Vänttinen 2022-09-04 12:13:36 +03:00 committed by GitHub
commit b3917105e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,6 +123,8 @@ const iconClicked = async function(field, icon) {
return;
}
let reconnected = false;
// Try to reconnect if KeePassXC is not currently connected
const connected = await sendMessage('is_connected');
if (!connected) {
@ -131,6 +133,8 @@ const iconClicked = async function(field, icon) {
kpxcUI.createNotification('error', tr('errorNotConnected'));
return;
}
reconnected = true;
}
const databaseHash = await sendMessage('check_database_hash');
@ -141,7 +145,7 @@ const iconClicked = async function(field, icon) {
field.focus();
}
if (icon.className.includes('unlock')) {
if (icon.className.includes('unlock') || reconnected) {
fillCredentials(field);
}
};