mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 16:14:25 +03:00
Resets the scroll position on controller content change
When scrolling through the preview of a long article, if the post was changed the scroll position of the preview would remain the same.
This commit is contained in:
parent
b92f201f08
commit
464db6f289
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user