mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Merge pull request #4765 from martinnormark/master
Load next page if scrollHeight <= clientHeight
This commit is contained in:
commit
e6305e83fa
1 changed files with 6 additions and 1 deletions
|
@ -22,9 +22,14 @@ var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({
|
|||
* Bind to the scroll event once the element is in the DOM
|
||||
*/
|
||||
attachCheckScroll: function () {
|
||||
var el = this.$();
|
||||
var el = this.$(),
|
||||
controller = this.get('controller');
|
||||
|
||||
el.on('scroll', Ember.run.bind(this, this.checkScroll));
|
||||
|
||||
if (this.element.scrollHeight <= this.element.clientHeight) {
|
||||
controller.send('loadNextPage');
|
||||
}
|
||||
}.on('didInsertElement'),
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue