mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Ignore buttons with different formaction
This commit is contained in:
parent
496a0d603c
commit
5eac65ec85
1 changed files with 3 additions and 2 deletions
|
|
@ -189,8 +189,9 @@ kpxcForm.getFormSubmitButton = function(form) {
|
|||
}
|
||||
|
||||
// Try to find another button. Select the last one.
|
||||
// TODO: Possibly change this behavior to select the last one for only certain sites.
|
||||
const buttons = Array.from(form.querySelectorAll(kpxcForm.formButtonQuery));
|
||||
// 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);
|
||||
if (buttons.length > 0) {
|
||||
return buttons[buttons.length - 1];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue