mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
doing it properly this time
mainPost always has index 0
This commit is contained in:
@@ -110,7 +110,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
|
||||
|
||||
navigator.scrollTop = function(index) {
|
||||
if ($('li[data-index="' + index + '"]').length) {
|
||||
navigator.scrollUp();
|
||||
navigator.scrollToPost(index, true);
|
||||
} else {
|
||||
ajaxify.go(generateUrl());
|
||||
}
|
||||
@@ -118,7 +118,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
|
||||
|
||||
navigator.scrollBottom = function(index) {
|
||||
if ($('li[data-index="' + index + '"]').length) {
|
||||
navigator.scrollDown();
|
||||
navigator.scrollToPost(index, true);
|
||||
} else {
|
||||
index = parseInt(index, 10) + 1;
|
||||
ajaxify.go(generateUrl(index));
|
||||
|
||||
Reference in New Issue
Block a user