From 75a77a4bc558423dcc084038eddea5c86b68919d Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sat, 1 Jan 2022 21:39:41 -0800 Subject: [PATCH 1/2] Fix error when trying to hide icon. (Failed to execute removeChild on Node: The node to be removed is not a child of this node.) --- keepassxc-browser/content/pwgen.js | 2 +- keepassxc-browser/content/username-field.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keepassxc-browser/content/pwgen.js b/keepassxc-browser/content/pwgen.js index a5dc8fe..9bcb263 100644 --- a/keepassxc-browser/content/pwgen.js +++ b/keepassxc-browser/content/pwgen.js @@ -224,7 +224,7 @@ kpxcPasswordDialog.trigger = async function() { kpxcPasswordDialog.showDialog = function(field, icon) { if (!kpxcFields.isVisible(field)) { - document.body.removeChild(icon); + icon.parentNode.removeChild(icon); field.removeAttribute('kpxc-password-field'); return; } diff --git a/keepassxc-browser/content/username-field.js b/keepassxc-browser/content/username-field.js index c251104..7af53fe 100644 --- a/keepassxc-browser/content/username-field.js +++ b/keepassxc-browser/content/username-field.js @@ -112,7 +112,7 @@ UsernameFieldIcon.prototype.createIcon = function(field) { const iconClicked = async function(field, icon) { if (!kpxcFields.isVisible(field)) { - document.body.removeChild(icon); + icon.parentNode.removeChild(icon); field.removeAttribute('kpxc-username-field'); return; } From 4410d9e9555b9a6255ca22a5518f12dbaae8cb78 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sat, 1 Jan 2022 21:46:27 -0800 Subject: [PATCH 2/2] Prevent text selection on the password generator title. This stops text from being selected on the page if you drag the window around (especially noticeable for fast movements). --- keepassxc-browser/css/pwgen.css | 1 + 1 file changed, 1 insertion(+) diff --git a/keepassxc-browser/css/pwgen.css b/keepassxc-browser/css/pwgen.css index 6b46d04..86cf3e2 100644 --- a/keepassxc-browser/css/pwgen.css +++ b/keepassxc-browser/css/pwgen.css @@ -20,6 +20,7 @@ margin: .2em 0 .2em 0; padding: .4em .2em .4em .8em; position: relative; + user-select: none; } .kpxc-pwgen-password-row {