Add submit button type to query

This commit is contained in:
varjolintu 2020-01-07 12:22:54 +02:00
parent 059d0ccf50
commit 8e1ef61215

View file

@ -1190,7 +1190,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];
}