mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1193 from keepassxreboot/fix/ignore_formaction_submit_elements
Ignore buttons with different formaction
This commit is contained in:
commit
4992b20519
1 changed files with 2 additions and 2 deletions
|
|
@ -189,8 +189,8 @@ 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.getAttribute('formAction'));
|
||||
if (buttons.length > 0) {
|
||||
return buttons[buttons.length - 1];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue