WordPress.org

Make WordPress Core

Changeset 22175


Ignore:
Timestamp:
10/11/2012 12:28:01 AM (6 years ago)
Author:
koopersmith
Message:

Media Modal: Only automatically select uploading attachments when in a workflow that supports multiple images.

Fixes a bug in featured images where uploading an image would force you to reopen the modal (as the modal would close on upload).

see #21390, #21776.

File:
1 edited

Legend:

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

    r22174 r22175  
    613613            // Track uploading attachments.
    614614            wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this );
    615             wp.Uploader.queue.on( 'add', this.selectUpload, this );
     615
     616            // If we're in a workflow that supports multiple attachments,
     617            // automatically select any uploading attachments.
     618            if ( this.controller.get('multiple') )
     619                wp.Uploader.queue.on( 'add', this.selectUpload, this );
    616620        },
    617621
Note: See TracChangeset for help on using the changeset viewer.