Fix error when dropping files for uploading on the editor before the media modal is initialized.

Props rommelxcastro, sebastiantiede. Fixes #32527.
Built from https://develop.svn.wordpress.org/trunk@32894


git-svn-id: http://core.svn.wordpress.org/trunk@32865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-06-20 21:08:26 +00:00
parent 759bcdbad1
commit c13cb27c14
3 changed files with 6 additions and 4 deletions

View File

@ -7874,7 +7874,7 @@ EditorUploader = View.extend({
* @param {jQuery.Event} event The 'drop' event.
*/
drop: function( event ) {
var $wrap = null, uploadView;
var $wrap, uploadView;
this.containerDragleave( event );
this.dropzoneDragleave( event );
@ -7891,13 +7891,15 @@ EditorUploader = View.extend({
}
if ( ! this.workflow ) {
this.workflow = wp.media.editor.open( 'content', {
this.workflow = wp.media.editor.open( window.wpActiveEditor, {
frame: 'post',
state: 'insert',
title: l10n.addMedia,
multiple: true
});
uploadView = this.workflow.uploader;
if ( uploadView.uploader && uploadView.uploader.ready ) {
this.addFiles.apply( this );
} else {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32893';
$wp_version = '4.3-alpha-32894';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.