diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php index e221f57f42..ca51e3fe6c 100644 --- a/wp-admin/upload-js.php +++ b/wp-admin/upload-js.php @@ -233,9 +233,10 @@ addLoadEvent( function() { if ( !win ) win = top; tinyMCE = win.tinyMCE; - if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) - win.tinyMCE.execCommand('mceInsertContent', false, h); - else + if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) { + tinyMCE.selectedInstance.getWin().focus(); + tinyMCE.execCommand('mceInsertContent', false, h); + } else win.edInsertContent(win.edCanvas, h); if ( !this.ID ) this.cancelView(); @@ -243,7 +244,7 @@ addLoadEvent( function() { }, deleteFile: function(id) { - if ( confirm("") { + if ( confirm("") ) { $('action-value').value = 'delete'; $('upload-file').submit(); return true; diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index ca4f62803e..8caac47be5 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -30,7 +30,7 @@ class WP_Scripts { $this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' ); $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '3684' ); $this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' ); - $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '4466' ); + $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '####' ); } }