[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Fix pagination scroll on tracker items comments

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a2957f6b7676_3843037f86751b@gitlab-sidekiq-low-urgency-cpu-bound-v2-5488cfffb7-2mswl.mail>

luci pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
a3b5920f by luci at 2026-06-10T12:20:00+00:00
[BP][FIX] Fix pagination scroll on tracker items comments
---
* [FIX] Fix pagination scroll on tracker items comments
---
* [FIX] Fix pagination scroll on tracker items comments
---
* [FIX] Fix pagination scroll on tracker items comments

When changing page on tracker item comments, it was always scrolling up,
to the first comment. This commit change the behaviour by only scrolling
up when loading the first page.

See merge request tikiwiki/tiki!10479


(cherry picked from commit fbeb14ca5c384e9c3eafb2537704ddfcc44cd412)

3a453fa5 [FIX] Fix pagination scroll on tracker items comments

Co-authored-by: John Livingston <git-l5zEM/[email protected]>

See merge request tikiwiki/tiki!10480


(cherry picked from commit b5104fa295eed26daabb88d443b43105f42ceda7)

98329137 [FIX] Fix pagination scroll on tracker items comments

Co-authored-by: luci <gitlab-TfYQc8/[email protected]>

See merge request tikiwiki/tiki!10482

- - - - -


1 changed file:

- lib/core/Services/Comment/Controller.php


Changes:

=====================================
lib/core/Services/Comment/Controller.php
=====================================
@@ -81,11 +81,16 @@ class Services_Comment_Controller
                         \$.service('comment', 'list'),
                         {type:'$type', objectId:'$objectId', offset: comment_offset},
                         function () {
-                            \$('html, body').animate({
-                                    scrollTop: \$commentContainer.offset().top
-                                }, 2000, function () {
-                                    \$commentContainer.tikiModal();
-                                });
+                            if (comment_offset == 0) {
+                                // If we want to load the first page, we have to go up.
+                                \$('html, body').animate({
+                                        scrollTop: \$commentContainer.offset().top
+                                    }, 2000, function () {
+                                        \$commentContainer.tikiModal();
+                                    });
+                            } else {
+                                \$commentContainer.tikiModal();
+                            }
                         }
                     );
                 return false;";



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a3b5920ff1722bddfd441e0f4715367e2558a522
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.