[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Tracker Comments: Fix collapsible comments expansion when item history...

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a0343999463b_38191ab83349a@gitlab-sidekiq-low-urgency-cpu-bound-v2-8b6f44c4b-jvfmc.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
c91f74f9 by Moïse Nturubika at 2026-05-12T14:52:26+00:00
[FIX] Tracker Comments: Fix collapsible comments expansion when item history version diff is present
---
* Fix collapsible comments expansion when version diff is present

See merge request tikiwiki/tiki!10198

- - - - -


1 changed file:

- templates/comment/list.tpl


Changes:

=====================================
templates/comment/list.tpl
=====================================
@@ -38,7 +38,8 @@
                         var hash = window.location.hash;
                         $('.comment-thread-wrapper[data-resolved="true"]').each(function() {
                             var $wrapper = $(this);
-                            var $collapse = $wrapper.find('.collapse').first();
+                            var threadId = $wrapper.data('comment-thread-id');
+                            var $collapse = $wrapper.find('#comment-thread-body-' + threadId);
                             if ($collapse.length) {
                                 var shouldExpand = false;
                                 if (hash && hash.match(/^#threadId=?\d+/)) {
@@ -82,12 +83,12 @@
                     $(document).off('click.resolved').on('click.resolved', '.comment-resolved-header', function() {
                         // Toggle handled by Bootstrap collapse
                     });
-                    $(document).on('shown.bs.collapse', '.comment-thread-wrapper .collapse', function() {
+                    $(document).on('shown.bs.collapse', '.comment-thread-wrapper .collapse[id^="comment-thread-body-"]', function () {
                         var $wrapper = $(this).closest('.comment-thread-wrapper');
                         $wrapper.find('.comment-collapse-icon').addClass('comment-collapse-icon-open');
                         $wrapper.find('.comment-resolved-header').attr('aria-expanded', 'true');
                     });
-                    $(document).on('hidden.bs.collapse', '.comment-thread-wrapper .collapse', function() {
+                    $(document).on('hidden.bs.collapse', '.comment-thread-wrapper .collapse[id^="comment-thread-body-"]', function () {
                         var $wrapper = $(this).closest('.comment-thread-wrapper');
                         $wrapper.find('.comment-collapse-icon').removeClass('comment-collapse-icon-open');
                         $wrapper.find('.comment-resolved-header').attr('aria-expanded', 'false');



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c91f74f90cd5cf3aed97ea7f0c828f57765a76f2

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c91f74f90cd5cf3aed97ea7f0c828f57765a76f2
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.