mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Media: Check to see if we need more attachments when the browser is attached to the DOM. fixes #22480, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b0ee4d8dda
commit
98494fdfe1
@ -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…
x
Reference in New Issue
Block a user