From 49bd03b8ec1ea8b56dc7045044ec1e30c587c49c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 15 Sep 2016 00:50:24 +0300 Subject: [PATCH] closes #5004 --- public/src/client/topic/posts.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 6aae064794..1c0d03eeb0 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -1,6 +1,6 @@ 'use strict'; -/* globals config, app, ajaxify, define, socket, utils */ +/* globals config, app, ajaxify, define, utils */ define('forum/topic/posts', [ 'forum/pagination', @@ -71,7 +71,10 @@ define('forum/topic/posts', [ if (isPostVisible) { createNewPosts(data, components.get('post').not('[data-index=0]'), direction, scrollToPost); } else if (ajaxify.data.scrollToMyPost && parseInt(posts[0].uid, 10) === parseInt(app.user.uid, 10)) { - pagination.loadPage(ajaxify.data.pagination.pageCount, scrollToPost); + // https://github.com/NodeBB/NodeBB/issues/5004#issuecomment-247157441 + setTimeout(function() { + pagination.loadPage(ajaxify.data.pagination.pageCount, scrollToPost); + }, 250); } else { updatePagination(); }