From 123f92ca1e5c4fcd5b2ddf1fac960d82c23318f9 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 15:36:10 -0500 Subject: [PATCH] fixed #711 --- public/src/forum/topic.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 99e47aaebe..454dd9b68f 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -321,6 +321,17 @@ define(['composer'], function(composer) { $('#post-container').on('click', '.deleted', function(ev) { $(this).toggleClass('deleted-expanded'); }); + + // Show the paginator block, now that the DOM has finished loading + (function delayedHeaderUpdate() { + if (!Topic.postCount) { + setTimeout(function() { + delayedHeaderUpdate(); + }, 25); + } else { + updateHeader(); + } + })(); }); function enableInfiniteLoading() { @@ -893,7 +904,6 @@ define(['composer'], function(composer) { Topic.postCount = templates.get('postcount'); window.onscroll = updateHeader; - window.onload = updateHeader; }; function updateHeader() {