From 06ae94d649deb48d1c3aec241002550cff65b67a Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Fri, 25 Jul 2025 17:09:14 +0300 Subject: [PATCH] Fix: Don't apply "chosen" to hidden objects ('.hidden, .hidden-shift') (skin.js) --- web/skins/classic/js/skin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 33a8fd0676..6e3f1cd1d4 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -1262,14 +1262,14 @@ function applyChosen(selector = '') { var [obj_1, obj_2, obj_3] = ''; destroyChosen(selector); if (typeof selector === 'string') { - obj_1 = $j(selector + '.chosen').not('.chosen-full-width, .chosen-auto-width'); - obj_2 = $j(selector + '.chosen.chosen-full-width'); - obj_3 = $j(selector + '.chosen.chosen-auto-width'); + obj_1 = $j(selector + '.chosen').not('.hidden, .hidden-shift, .chosen-full-width, .chosen-auto-width'); + obj_2 = $j(selector + '.chosen.chosen-full-width').not('.hidden, .hidden-shift'); + obj_3 = $j(selector + '.chosen.chosen-auto-width').not('.hidden, .hidden-shift'); } else { if (!$j(selector).hasClass('chosen')) return; - obj_1 = $j(selector).not('.chosen-full-width, .chosen-auto-width'); - obj_2 = $j(selector).hasClass('chosen-full-width') ? $j(selector) : ''; - obj_3 = $j(selector).hasClass('chosen-auto-width') ? $j(selector) : ''; + obj_1 = $j(selector).not('.hidden, .hidden-shift, .chosen-full-width, .chosen-auto-width'); + obj_2 = $j(selector).not('.hidden, .hidden-shift').hasClass('chosen-full-width') ? $j(selector) : ''; + obj_3 = $j(selector).not('.hidden, .hidden-shift').hasClass('chosen-auto-width') ? $j(selector) : ''; } if (obj_1) { obj_1.chosen({allow_single_deselect: true, disable_search_threshold: limit_search_threshold, search_contains: true});