From 96cdf5c7a7ab2ba3a644e2beb4e9c82a2c9e9132 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 30 Apr 2008 20:12:39 +0000 Subject: [PATCH] send_to_editor fix for FF. Props azaozz. fixes #6864 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@7860 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/media-upload.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index b8c615d411..87d6fe95fc 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -1,8 +1,7 @@ // send html to the post editor function send_to_editor(h) { - var win = window.opener ? window.opener : window.dialogArguments; - if ( !win ) - win = top; + var win = window.dialogArguments || opener || parent || top; + tinyMCE = win.tinyMCE; if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) { tinyMCE.selectedInstance.getWin().focus();