Switch from direct access to getAttribute()

This commit is contained in:
varjolintu 2021-01-29 17:14:54 +02:00
parent 5eac65ec85
commit 2fb17f7b19

View file

@ -190,8 +190,7 @@ kpxcForm.getFormSubmitButton = function(form) {
// Try to find another button. Select the last one.
// 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);
const buttons = Array.from(form.querySelectorAll(kpxcForm.formButtonQuery)).filter(b => !b.getAttribute('formAction'));
if (buttons.length > 0) {
return buttons[buttons.length - 1];
}