mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
closes #3081
This commit is contained in:
@@ -161,7 +161,8 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
|
||||
|
||||
var elTop = el.offset().top;
|
||||
var elBottom = elTop + Math.floor(el.height());
|
||||
return (elTop >= scrollTop && elBottom <= scrollBottom) || (elTop <= scrollTop && elBottom >= scrollTop);
|
||||
|
||||
return (elTop >= scrollTop && elBottom < scrollBottom) || (elTop < scrollTop && elBottom > scrollTop);
|
||||
}
|
||||
|
||||
navigator.scrollToPost = function(postIndex, highlight, duration, offset) {
|
||||
|
||||
@@ -89,9 +89,9 @@ topicsController.get = function(req, res, next) {
|
||||
}
|
||||
if (!settings.usePagination) {
|
||||
if (reverse) {
|
||||
postIndex = Math.max(0, postCount - (req.params.post_index || postCount) - (settings.postsPerPage - 1));
|
||||
postIndex = Math.max(0, postCount - (req.params.post_index || postCount) - (settings.postsPerPage / 2));
|
||||
} else {
|
||||
postIndex = Math.max(0, (req.params.post_index || 1) - (settings.postsPerPage + 1));
|
||||
postIndex = Math.max(0, (req.params.post_index || 1) - (settings.postsPerPage / 2));
|
||||
}
|
||||
} else if (!req.query.page) {
|
||||
var index = 0;
|
||||
|
||||
Reference in New Issue
Block a user