diff --git a/public_html/js/Presenters/GlobalCommentListPresenter.js b/public_html/js/Presenters/GlobalCommentListPresenter.js index b4ca6d3b..983c2448 100644 --- a/public_html/js/Presenters/GlobalCommentListPresenter.js +++ b/public_html/js/Presenters/GlobalCommentListPresenter.js @@ -33,7 +33,7 @@ App.Presenters.GlobalCommentListPresenter = function( backendUri: '/comments', $target: $el.find('.pagination-target'), updateCallback: function($page, data) { - renderPosts($page, data.entities); + renderComments($page, data.entities); }, }, function() { @@ -59,7 +59,7 @@ App.Presenters.GlobalCommentListPresenter = function( $el.html(templates.list()); } - function renderPosts($page, data) { + function renderComments($page, data) { var $target = $page.find('.posts'); _.each(data, function(data) { var post = data.post; @@ -84,6 +84,7 @@ App.Presenters.GlobalCommentListPresenter = function( $target.append($post); }); + window.scrollTo(0, 0); } return { diff --git a/public_html/js/Presenters/PostListPresenter.js b/public_html/js/Presenters/PostListPresenter.js index fa0fbc5f..db458b70 100644 --- a/public_html/js/Presenters/PostListPresenter.js +++ b/public_html/js/Presenters/PostListPresenter.js @@ -113,6 +113,7 @@ App.Presenters.PostListPresenter = function( } }); windowResized(); + window.scrollTo(0, 0); } function shouldSkipPost(post) { diff --git a/public_html/js/Presenters/TagListPresenter.js b/public_html/js/Presenters/TagListPresenter.js index 1f881669..c1f16b1f 100644 --- a/public_html/js/Presenters/TagListPresenter.js +++ b/public_html/js/Presenters/TagListPresenter.js @@ -120,6 +120,7 @@ App.Presenters.TagListPresenter = function( })); $target.append($item); }); + window.scrollTo(0, 0); } return { diff --git a/public_html/js/Presenters/UserListPresenter.js b/public_html/js/Presenters/UserListPresenter.js index f4e531c1..e1c16083 100644 --- a/public_html/js/Presenters/UserListPresenter.js +++ b/public_html/js/Presenters/UserListPresenter.js @@ -78,6 +78,7 @@ App.Presenters.UserListPresenter = function( $target.append($item); }); _.map(_.map($target.find('img'), jQuery), util.loadImagesNicely); + window.scrollTo(0, 0); } return {