mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
Fix up editor/preview scroll and post list loading
Refs #5381 - Invoke this._super() so mixed in lifecycle hooks run.
This commit is contained in:
parent
564d64bac4
commit
78361c25af
@ -28,6 +28,8 @@ Editor = Ember.TextArea.extend(EditorAPI, EditorShortcuts, EditorScroll, {
|
||||
* Sets up properties at render time
|
||||
*/
|
||||
didInsertElement: function () {
|
||||
this._super();
|
||||
|
||||
this.setFocus();
|
||||
|
||||
this.sendAction('setEditor', this);
|
||||
|
@ -91,10 +91,14 @@ var EditorScroll = Ember.Mixin.create({
|
||||
},
|
||||
|
||||
didInsertElement: function () {
|
||||
this._super();
|
||||
|
||||
this.attachScrollHandlers();
|
||||
},
|
||||
|
||||
willDestroyElement: function () {
|
||||
this._super();
|
||||
|
||||
this.detachScrollHandlers();
|
||||
}
|
||||
});
|
||||
|
@ -34,10 +34,14 @@ var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({
|
||||
},
|
||||
|
||||
didInsertElement: function () {
|
||||
this._super();
|
||||
|
||||
this.attachCheckScroll();
|
||||
},
|
||||
|
||||
willDestroyElement: function () {
|
||||
this._super();
|
||||
|
||||
// unbind from the scroll event when the element is no longer in the DOM
|
||||
this.$().off('scroll');
|
||||
}
|
||||
|
@ -15,10 +15,14 @@ var PaginatedScrollBox = Ember.View.extend(PaginationViewMixin, {
|
||||
},
|
||||
|
||||
didInsertElement: function () {
|
||||
this._super();
|
||||
|
||||
this.attachScrollClassHandler();
|
||||
},
|
||||
|
||||
willDestroyElement: function () {
|
||||
this._super();
|
||||
|
||||
// removes scroll class handler event
|
||||
this.$().off('scroll');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user