In the media modal, clear attachment details when clearing the selection.
Props koopersmith fixes #22718 git-svn-id: http://core.svn.wordpress.org/trunk@23045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0bd02ac6bb
commit
edf9769d26
|
@ -858,8 +858,14 @@ window.wp = window.wp || {};
|
|||
|
||||
// If single has changed, fire an event.
|
||||
if ( this._single !== previous ) {
|
||||
if ( previous )
|
||||
if ( previous ) {
|
||||
previous.trigger( 'selection:unsingle', previous, this );
|
||||
|
||||
// If the model was already removed, trigger the collection
|
||||
// event manually.
|
||||
if ( ! this.getByCid( previous.cid ) )
|
||||
this.trigger( 'selection:unsingle', previous, this );
|
||||
}
|
||||
if ( this._single )
|
||||
this._single.trigger( 'selection:single', this._single, this );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue