mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +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
|
* Sets up properties at render time
|
||||||
*/
|
*/
|
||||||
didInsertElement: function () {
|
didInsertElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
this.setFocus();
|
this.setFocus();
|
||||||
|
|
||||||
this.sendAction('setEditor', this);
|
this.sendAction('setEditor', this);
|
||||||
|
@ -91,10 +91,14 @@ var EditorScroll = Ember.Mixin.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement: function () {
|
didInsertElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
this.attachScrollHandlers();
|
this.attachScrollHandlers();
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement: function () {
|
willDestroyElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
this.detachScrollHandlers();
|
this.detachScrollHandlers();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -34,10 +34,14 @@ var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement: function () {
|
didInsertElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
this.attachCheckScroll();
|
this.attachCheckScroll();
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement: function () {
|
willDestroyElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
// unbind from the scroll event when the element is no longer in the DOM
|
// unbind from the scroll event when the element is no longer in the DOM
|
||||||
this.$().off('scroll');
|
this.$().off('scroll');
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,14 @@ var PaginatedScrollBox = Ember.View.extend(PaginationViewMixin, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement: function () {
|
didInsertElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
this.attachScrollClassHandler();
|
this.attachScrollClassHandler();
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement: function () {
|
willDestroyElement: function () {
|
||||||
|
this._super();
|
||||||
|
|
||||||
// removes scroll class handler event
|
// removes scroll class handler event
|
||||||
this.$().off('scroll');
|
this.$().off('scroll');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user