Merge pull request #741 from keepassxreboot/fix/add_submit_button_to_query

Add submit button type to query with forms
This commit is contained in:
Sami Vänttinen 2020-02-09 18:06:20 +02:00 committed by GitHub
commit d4fa2f7155

View file

@ -1198,7 +1198,7 @@ kpxc.getFormSubmitButton = function(form) {
}
// Try to find another button. Select the first one.
const buttons = Array.from(form.querySelectorAll('button[type=\'button\'], input[type=\'button\'], button:not([type])'));
const buttons = Array.from(form.querySelectorAll('button[type=\'button\'], button[type=\'submit\'], input[type=\'button\'], button:not([type])'));
if (buttons.length > 0) {
return buttons[0];
}