diff --git a/keepassxc-browser/background/legacyProtocol.js b/keepassxc-browser/background/legacyProtocol.js index 93ef4bc..33fd3ae 100644 --- a/keepassxc-browser/background/legacyProtocol.js +++ b/keepassxc-browser/background/legacyProtocol.js @@ -45,7 +45,7 @@ keepassProtocol.associate = async function(tab) { keepass.associated.value = true; keepass.associated.hash = response.hash || 0; - browserAction.show(tab); + browserAction.showDefault(tab); return AssociatedAction.NEW_ASSOCIATION; } diff --git a/keepassxc-browser/background/legacyProtocolClient.js b/keepassxc-browser/background/legacyProtocolClient.js index 69ff16a..7973fa9 100644 --- a/keepassxc-browser/background/legacyProtocolClient.js +++ b/keepassxc-browser/background/legacyProtocolClient.js @@ -37,7 +37,7 @@ keepassClient.sendNativeMessage = function(request, enableTimeout = false, timeo const handler = (msg) => { if (msg && msg?.action === action) { // If the request has a separate requestID, check if it matches when there's no nonce (an error message) - const isNotificationOrError = !msg.nonce && request.requestID === msg.requestID; + const isNotificationOrError = !msg.nonce && (request.requestID === msg.requestID || (msg.error && msg.errorCode)); // Only resolve a matching response or a notification (without nonce) if (isNotificationOrError || messageBuffer.matchAndRemove(msg)) {