mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
post/anchor component
This commit is contained in:
@@ -161,7 +161,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
|
||||
duration = duration !== undefined ? duration : 400;
|
||||
navigator.scrollActive = true;
|
||||
|
||||
if($('#post_anchor_' + postIndex).length) {
|
||||
if(components.get('post/anchor', postIndex).length) {
|
||||
return scrollToPid(postIndex, highlight, duration, offset);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
|
||||
};
|
||||
|
||||
function scrollToPid(postIndex, highlight, duration, offset) {
|
||||
var scrollTo = $('#post_anchor_' + postIndex);
|
||||
var scrollTo = components.get('post/anchor', postIndex);
|
||||
|
||||
if (!scrollTo) {
|
||||
navigator.scrollActive = false;
|
||||
|
||||
Reference in New Issue
Block a user