Merge pull request #3819 from studioromeo/reset-preview-scroll-position

Reset preview scroll position when post item is clicked
This commit is contained in:
Hannah Wolfe 2014-09-02 16:28:53 +01:00
commit 7936fc7d12

View File

@ -11,6 +11,10 @@ var PostContentView = Ember.View.extend({
}));
},
contentObserver: function () {
this.$().closest('.content-preview').scrollTop(0);
}.observes('controller.content'),
willDestroyElement: function () {
var el = this.$();
el.off('scroll');