Hide the editor uploader overlay on all drop events in the window, not only when dropping on the editor uploader element.


Fixes #34251, #22403.

git-svn-id: https://develop.svn.wordpress.org/trunk@35019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-10-10 23:49:44 +00:00
parent ddec8a1c2b
commit 0d6ea366c5
6 changed files with 18 additions and 10 deletions

View File

@ -7855,6 +7855,10 @@ EditorUploader = View.extend({
this.$document.on( 'dragstart dragend drop', _.bind( function( event ) {
this.localDrag = event.type === 'dragstart';
if ( event.type === 'drop' ) {
this.containerDragleave();
}
}, this ) );
this.initialized = true;

View File

@ -49,6 +49,10 @@ EditorUploader = View.extend({
this.$document.on( 'dragstart dragend drop', _.bind( function( event ) {
this.localDrag = event.type === 'dragstart';
if ( event.type === 'drop' ) {
this.containerDragleave();
}
}, this ) );
this.initialized = true;
@ -128,7 +132,6 @@ EditorUploader = View.extend({
drop: function( event ) {
var $wrap, uploadView;
this.containerDragleave( event );
this.dropzoneDragleave( event );
this.files = event.originalEvent.dataTransfer.files;

File diff suppressed because one or more lines are too long

View File

@ -288,7 +288,7 @@ function wp_default_scripts( &$scripts ) {
'error_uploading' => __('“%s” has failed to upload.')
);
$scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.1' );
$scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.8' );
// Back compat handles:
foreach ( array( 'all', 'html5', 'flash', 'silverlight', 'html4' ) as $handle ) {
$scripts->add( "plupload-$handle", false, array( 'plupload' ), '2.1.1' );