diff --git a/client/js/lounge.js b/client/js/lounge.js index ab5002a4..e2a3cd13 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -512,7 +512,6 @@ $(function() { // get the scrollable wrapper around messages var scrollable = chan.closest(".chat"); var heightOld = chan.height(); - chan.prepend(documentFragment).end(); // Remove the date-change marker we put at the top, because it may // not actually be a date change now @@ -524,6 +523,9 @@ $(function() { children.eq(1).remove(); } + // Add the older messages + chan.prepend(documentFragment).end(); + // restore scroll position var position = chan.height() - heightOld; scrollable.scrollTop(position);