Add some delay to allow the flash uploader swf to load in FF4, fixes #17329

git-svn-id: https://develop.svn.wordpress.org/trunk@18073 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-05-30 02:23:45 +00:00
parent f313a881e8
commit ee6db8dcaf
3 changed files with 6 additions and 6 deletions

View File

@ -43,13 +43,13 @@
var SWFUpload; var SWFUpload;
if (typeof(SWFUpload) === "function") { if (typeof(SWFUpload) === "function") {
SWFUpload.onload = function () {}; SWFUpload.onload = function () {};
swfobject.addDomLoadEvent(function () { swfobject.addDomLoadEvent(function () {
if (typeof(SWFUpload.onload) === "function") { if (typeof(SWFUpload.onload) === "function") {
SWFUpload.onload.call(window); setTimeout(function(){SWFUpload.onload.call(window);}, 200);
} }
}); });
SWFUpload.prototype.initSettings = (function (oldInitSettings) { SWFUpload.prototype.initSettings = (function (oldInitSettings) {
return function () { return function () {
if (typeof(oldInitSettings) === "function") { if (typeof(oldInitSettings) === "function") {

File diff suppressed because one or more lines are too long

View File

@ -209,7 +209,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", false, '2.2'); $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", false, '2.2');
$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2201-20110113'); $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2201-20110113');
$scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201'); $scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201a');
$scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201'); $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201');
$scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201'); $scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201');
@ -217,7 +217,7 @@ function wp_default_scripts( &$scripts ) {
// queue all SWFUpload scripts that are used by default // queue all SWFUpload scripts that are used by default
$scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201'); $scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201');
} else { } else {
$scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201'); $scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201a');
} }
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524'); $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');