From 64064b59741f5522c8d9e2cf392c90ffd43313c7 Mon Sep 17 00:00:00 2001 From: Linty Date: Thu, 9 Jan 2025 10:33:09 +0100 Subject: [PATCH] fixes #2310 check whether there is a textarea when pressing enter --- admin/themes/default/js/batchManagerGlobal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/themes/default/js/batchManagerGlobal.js b/admin/themes/default/js/batchManagerGlobal.js index 199235865..3b8d5eb09 100644 --- a/admin/themes/default/js/batchManagerGlobal.js +++ b/admin/themes/default/js/batchManagerGlobal.js @@ -226,7 +226,9 @@ function selectDelDerivNone() { // Trigger action click on pressing enter and if the value of applyAction is not equal to -1 $(window).on('keypress', function(e) { - if (e.key === "Enter" && $("select[name='selectAction']").val() != -1) { + const selected = $("select[name='selectAction']").val(); + const haveTextarea = $(`#action_${selected} textarea`).length; + if (e.key === "Enter" && selected != -1 && !haveTextarea) { e.preventDefault(); $('#applyAction').trigger('click'); }