WordPress.org

Make WordPress Core

Changeset 32894


Ignore:
Timestamp:
06/20/2015 09:07:03 PM (4 years ago)
Author:
azaozz
Message:

Fix error when dropping files for uploading on the editor before the media modal is initialized.
Props rommelxcastro, sebastiantiede. Fixes #32527.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

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

    r32697 r32894  
    78757875     */
    78767876    drop: function( event ) {
    7877         var $wrap = null, uploadView;
     7877        var $wrap, uploadView;
    78787878
    78797879        this.containerDragleave( event );
     
    78927892
    78937893        if ( ! this.workflow ) {
    7894             this.workflow = wp.media.editor.open( 'content', {
     7894            this.workflow = wp.media.editor.open( window.wpActiveEditor, {
    78957895                frame:    'post',
    78967896                state:    'insert',
     
    78987898                multiple: true
    78997899            });
     7900
    79007901            uploadView = this.workflow.uploader;
     7902
    79017903            if ( uploadView.uploader && uploadView.uploader.ready ) {
    79027904                this.addFiles.apply( this );
  • trunk/src/wp-includes/js/media/views/uploader/editor.js

    r32677 r32894  
    129129     */
    130130    drop: function( event ) {
    131         var $wrap = null, uploadView;
     131        var $wrap, uploadView;
    132132
    133133        this.containerDragleave( event );
     
    146146
    147147        if ( ! this.workflow ) {
    148             this.workflow = wp.media.editor.open( 'content', {
     148            this.workflow = wp.media.editor.open( window.wpActiveEditor, {
    149149                frame:    'post',
    150150                state:    'insert',
     
    152152                multiple: true
    153153            });
     154
    154155            uploadView = this.workflow.uploader;
     156
    155157            if ( uploadView.uploader && uploadView.uploader.ready ) {
    156158                this.addFiles.apply( this );
Note: See TracChangeset for help on using the changeset viewer.