Targets the crmAccordionToggle more tightly
authorNicol <vingle@users.noreply.github.com>
Wed, 6 Dec 2023 21:00:30 +0000 (21:00 +0000)
committerGitHub <noreply@github.com>
Wed, 6 Dec 2023 21:00:30 +0000 (21:00 +0000)
So as to not hide the <details> content.

js/Common.js

index 1b5c08f9d1a661150cf293996e30e30982c496cf..113efcc3170e8dd9289caa682ece39ef7021877e 100644 (file)
@@ -1730,10 +1730,10 @@ if (!CRM.vars) CRM.vars = {};
     $(this).each(function () {
       var action = 'open';
       if ($(this).hasClass('collapsed')) {
-        $('.crm-accordion-body', this).first().css('display', 'none').slideDown(speed);
+        $('div.crm-accordion-wrapper > .crm-accordion-body', this).first().css('display', 'none').slideDown(speed);
       }
       else {
-        $('.crm-accordion-body', this).first().css('display', 'block').slideUp(speed);
+        $('div.crm-accordion-wrapper > .crm-accordion-body', this).first().css('display', 'block').slideUp(speed);
         action = 'close';
       }
       $(this).toggleClass('collapsed').trigger('crmAccordion:' + action);