From 2fb17f7b19429f7d88d42b6c3f323daf4d30b237 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Fri, 29 Jan 2021 17:14:54 +0200 Subject: [PATCH] Switch from direct access to getAttribute() --- keepassxc-browser/content/keepassxc-browser.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index 7125fa9..798b9d1 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -190,8 +190,7 @@ kpxcForm.getFormSubmitButton = function(form) { // Try to find another button. Select the last one. // If any formaction overriding the default action is set, ignore those buttons. - const buttons = Array.from(form.querySelectorAll(kpxcForm.formButtonQuery)) - .filter(b => b.formAction === document.location.href); + const buttons = Array.from(form.querySelectorAll(kpxcForm.formButtonQuery)).filter(b => !b.getAttribute('formAction')); if (buttons.length > 0) { return buttons[buttons.length - 1]; }