Media: Check to see if we need more attachments when the browser is attached to the DOM. fixes #22480, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22806 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0b59477b3a
commit
0086598c9b
@ -2572,12 +2572,10 @@
|
||||
this.css();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
dispose: function() {
|
||||
this.collection.props.off( null, null, this );
|
||||
this.collection.off( 'add remove reset', null, this );
|
||||
this.model.off( 'change:edge change:gutter', this.css, this );
|
||||
$(window).off( 'resize.attachments', this._resizeCss );
|
||||
this.remove();
|
||||
media.View.prototype.dispose.apply( this, arguments );
|
||||
},
|
||||
|
||||
css: function() {
|
||||
@ -2680,11 +2678,13 @@
|
||||
}).render().$el;
|
||||
}, this ) );
|
||||
|
||||
// Then, trigger the scroll event to check if we're within the
|
||||
return this;
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
// Trigger the scroll event to check if we're within the
|
||||
// threshold to query for additional attachments.
|
||||
this.scroll();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
add: function( attachment, index ) {
|
||||
|
Loading…
Reference in New Issue
Block a user