Skip to content

Node.js based forum software built for the modern web

dont scroll to 0th post

Baris Soner Usakli1712fcc9fec0
diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js
index 9777b6d5a7..382312141e 100644
--- a/public/src/forum/topic.js
+++ b/public/src/forum/topic.js
@@ -1145,10 +1145,12 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
if (!pid) {
return;
}
+
if(!offset) {
offset = 0;
}
+
if($('#post_anchor_' + pid).length) {
return scrollToPid(pid);
}
@@ -1193,7 +1195,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
});
}
- if (tid && scrollTo.length) {
+ if (tid && scrollTo.length && $('#post-container li.post-row[data-pid="' + pid + '"]').attr('data-index') !== '0') {
animateScroll();
}
}