Ticket #24859: 24859.16.diff
File 24859.16.diff, 1.1 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/media-views.js
4886 4886 4887 4887 scroll: function() { 4888 4888 var view = this, 4889 toolbar ;4889 toolbar = this.views.parent.toolbar; 4890 4890 4891 // @todo: is thisstill necessary?4892 if ( ! this.$el.is(':visible') ) {4891 // @todo: is :visible still necessary? 4892 if ( ! this.$el.is(':visible') || ! this.collection.hasMore() ) { 4893 4893 return; 4894 4894 } 4895 4895 4896 if ( this.collection.hasMore() && this.el.scrollHeight < this.el.scrollTop + ( this.el.clientHeight * this.options.refreshThreshold ) ) {4897 toolbar = this.views.parent.toolbar;4896 // Show the spinner only if we are close to the bottom. 4897 if ( this.el.scrollHeight - ( this.el.scrollTop + this.el.clientHeight ) < this.el.clientHeight / 3 ) { 4898 4898 toolbar.get('spinner').show(); 4899 } 4899 4900 4901 if ( this.el.scrollHeight < this.el.scrollTop + ( this.el.clientHeight * this.options.refreshThreshold ) ) { 4900 4902 this.collection.more().done(function() { 4901 4903 view.scroll(); 4902 4904 toolbar.get('spinner').hide();