From 9eeeca6b0e37b08a6fd791b407c8862d16a21d30 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Sun, 3 Nov 2024 00:13:27 +0100 Subject: [PATCH] Fix highlighting default submit button in indexes form --- adminer/static/functions.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 0a1ea0ae..06fa07df 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -1128,10 +1128,12 @@ function inputBlur() { } } -/** Find submit button used by Enter -* @param HTMLElement -* @return HTMLInputElement -*/ +/** + * Finds submit button used by Enter. + * + * @param {HTMLElement} el + * @return {HTMLInputElement} + */ function findDefaultSubmit(el) { if (el.jushTextarea) { el = el.jushTextarea; @@ -1139,10 +1141,10 @@ function findDefaultSubmit(el) { if (!el.form) { return null; } - var inputs = qsa('input', el.form); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if (input.type === 'submit' && !input.style.zIndex) { + + const inputs = qsa('input', el.form); + for (const input of inputs) { + if (input.type === 'submit' && !input.classList.contains("wayoff") && !input.style.zIndex) { return input; } }