Make WordPress Core

Changeset 23045


Ignore:
Timestamp:
12/04/2012 10:19:08 PM (14 years ago)
Author:
ryan
Message:

In the media modal, clear attachment details when clearing the selection.

Props koopersmith
fixes #22718

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-models.js

    r23032 r23045  
    859859                        // If single has changed, fire an event.
    860860                        if ( this._single !== previous ) {
    861                                 if ( previous )
     861                                if ( previous ) {
    862862                                        previous.trigger( 'selection:unsingle', previous, this );
     863
     864                                        // If the model was already removed, trigger the collection
     865                                        // event manually.
     866                                        if ( ! this.getByCid( previous.cid ) )
     867                                                this.trigger( 'selection:unsingle', previous, this );
     868                                }
    863869                                if ( this._single )
    864870                                        this._single.trigger( 'selection:single', this._single, this );
Note: See TracChangeset for help on using the changeset viewer.