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:
Daryl Koopersmith 2012-11-22 03:19:08 +00:00
parent b0ee4d8dda
commit 98494fdfe1

View File

@ -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 ) {