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(); }