From 66a7aa4b232838481ef85d9ac385eccdfd1bf8fa Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 29 Oct 2022 14:22:00 +0200 Subject: [PATCH] Fix closing the criteria area on checkbox click - click on "criteria" - tick the checkbox - it closes the aera (this commit removes the closing) Ref #17841 Signed-off-by: William Desportes --- js/src/database/multi_table_query.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/src/database/multi_table_query.js b/js/src/database/multi_table_query.js index 890c4fc56c..bd078de5d7 100644 --- a/js/src/database/multi_table_query.js +++ b/js/src/database/multi_table_query.js @@ -195,6 +195,11 @@ AJAX.registerOnload('database/multi_table_query.js', function () { $('.criteria_col').each(function () { $(this).on('change', function () { var $anchor = $(this).siblings('.jsCriteriaButton').first(); + if ($(this).is(':checked') && ! $anchor.hasClass('collapsed')) { + // Do not collapse on checkbox tick as it does not make sense + // The user has it open and wants to tick the box + return; + } $anchor.trigger('click', ['Trigger']); }); });