0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

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 () { willDestroyElement: function () {
var el = this.$(); var el = this.$();
el.off('scroll'); el.off('scroll');