mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #898 from keepassxreboot/fix/identify_more_form_buttons
Try to identify more form buttons
This commit is contained in:
commit
cd534e856b
1 changed files with 10 additions and 0 deletions
|
|
@ -1300,6 +1300,16 @@ kpxc.getFormSubmitButton = function(form) {
|
|||
return buttons[0];
|
||||
}
|
||||
|
||||
// Try to find similar buttons outside the form which are added via 'form' property
|
||||
for (const e of form.elements) {
|
||||
if ((e.nodeName === 'BUTTON' && e.type === 'button')
|
||||
|| (e.nodeName === 'BUTTON' && e.type === 'submit')
|
||||
|| (e.nodeName === 'INPUT' && e.type === 'button')
|
||||
|| (e.nodeName === 'BUTTON' && e.type === '')) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue