From 701cf4a9b832e91785a9d001b6d8267fc02c1fad Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 27 Jan 2014 15:19:52 -0500 Subject: [PATCH] FIX: Scroll to top on categories view, too. --- .../discourse/views/list/discovery_categories_view.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/discourse/views/list/discovery_categories_view.js b/app/assets/javascripts/discourse/views/list/discovery_categories_view.js index 98e2842b3e8..bde18682645 100644 --- a/app/assets/javascripts/discourse/views/list/discovery_categories_view.js +++ b/app/assets/javascripts/discourse/views/list/discovery_categories_view.js @@ -24,6 +24,12 @@ Discourse.DiscoveryCategoriesView = Discourse.View.extend({ }); }, + _scrollTop: function() { + Em.run.schedule('afterRender', function() { + $(document).scrollTop(0); + }); + }.on('didInsertElement'), + disableOrdering: function(){ this.rows().sortable("destroy").off('sortupdate'); },