From fd9e01985d007d294b7cbbc6b69f8538261d1b2a Mon Sep 17 00:00:00 2001 From: varjolintu Date: Fri, 11 May 2018 11:44:32 +0300 Subject: [PATCH] Fix save domain only option --- keepassxc-browser/keepassxc-browser.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index 490f675..245667e 100755 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -632,7 +632,8 @@ cipDefine.initDescription = function() { fieldIds.push(cipFields.prepareId(i)); } - cip.settings['defined-credential-fields'][document.location.href] = { + const location = cip.getDocumentLocation(); + cip.settings['defined-credential-fields'][location] = { username: cipDefine.selection.username, password: cipDefine.selection.password, fields: fieldIds @@ -652,7 +653,8 @@ cipDefine.initDescription = function() { $description.append($btnAgain); $description.append($btnDismiss); - if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.href]) { + const location = cip.getDocumentLocation(); + if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][location]) { const $p = jQuery('

').html('For this page credential fields are already selected and will be overwritten.
'); const $btnDiscard = jQuery('