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:
commit
7936fc7d12
1 changed files with 4 additions and 0 deletions
|
@ -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');
|
||||||
|
|
Loading…
Add table
Reference in a new issue