[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] Fix pagination scroll on tracker items comments
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a293e53d5966_38551f658193c1@gitlab-sidekiq-low-urgency-cpu-bound-v2-5488cfffb7-5w228.mail> |
luci pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: b5104fa2 by luci at 2026-06-10T10:30:41+00:00 [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 - - - - - 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/b5104fa295eed26daabb88d443b43105f42ceda7 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/b5104fa295eed26daabb88d443b43105f42ceda7 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