Media: properly refresh the position of the Plupload shim so it moves over the Select Files button or off the screen. Fixes selecting files in MS Edge on the Media grid and Media -> Add New screens.
Fixes #37039. git-svn-id: https://develop.svn.wordpress.org/trunk@37722 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e1cfb25e79
commit
70afec2875
@ -774,6 +774,10 @@ Manage = MediaFrame.extend({
|
||||
addNewClickHandler: function( event ) {
|
||||
event.preventDefault();
|
||||
this.trigger( 'toggle:upload:attachment' );
|
||||
|
||||
if ( this.uploader ) {
|
||||
this.uploader.refresh();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -189,6 +189,10 @@ Manage = MediaFrame.extend({
|
||||
addNewClickHandler: function( event ) {
|
||||
event.preventDefault();
|
||||
this.trigger( 'toggle:upload:attachment' );
|
||||
|
||||
if ( this.uploader ) {
|
||||
this.uploader.refresh();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -430,14 +430,14 @@ jQuery(document).ready(function($){
|
||||
|
||||
if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) {
|
||||
uploaddiv.addClass('drag-drop');
|
||||
$('#drag-drop-area').bind('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
|
||||
$('#drag-drop-area').on('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
|
||||
uploaddiv.addClass('drag-over');
|
||||
}).bind('dragleave.wp-uploader, drop.wp-uploader', function(){
|
||||
}).on('dragleave.wp-uploader, drop.wp-uploader', function(){
|
||||
uploaddiv.removeClass('drag-over');
|
||||
});
|
||||
} else {
|
||||
uploaddiv.removeClass('drag-drop');
|
||||
$('#drag-drop-area').unbind('.wp-uploader');
|
||||
$('#drag-drop-area').off('.wp-uploader');
|
||||
}
|
||||
|
||||
if ( up.runtime === 'html4' ) {
|
||||
@ -445,6 +445,10 @@ jQuery(document).ready(function($){
|
||||
}
|
||||
});
|
||||
|
||||
uploader.bind( 'postinit', function( up ) {
|
||||
up.refresh();
|
||||
});
|
||||
|
||||
uploader.init();
|
||||
|
||||
uploader.bind('FilesAdded', function( up, files ) {
|
||||
|
@ -180,6 +180,11 @@ window.wp = window.wp || {};
|
||||
$(self).trigger( 'uploader:ready' );
|
||||
});
|
||||
|
||||
this.uploader.bind( 'postinit', function( up ) {
|
||||
up.refresh();
|
||||
self.init();
|
||||
});
|
||||
|
||||
this.uploader.init();
|
||||
|
||||
if ( this.browser ) {
|
||||
@ -311,9 +316,6 @@ window.wp = window.wp || {};
|
||||
up.refresh();
|
||||
});
|
||||
|
||||
this.uploader.bind( 'PostInit', function() {
|
||||
self.init();
|
||||
});
|
||||
};
|
||||
|
||||
// Adds the 'defaults' and 'browser' properties.
|
||||
|
Loading…
Reference in New Issue
Block a user