dont scroll to 0th post

v1.18.x
Baris Soner Usakli 11 years ago
parent 229fe2f80f
commit 1712fcc9fe

@ -1145,10 +1145,12 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
if (!pid) { if (!pid) {
return; return;
} }
if(!offset) { if(!offset) {
offset = 0; offset = 0;
} }
if($('#post_anchor_' + pid).length) { if($('#post_anchor_' + pid).length) {
return scrollToPid(pid); 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(); animateScroll();
} }
} }

Loading…
Cancel
Save