Ticket #6864 (closed defect: fixed)

Opened 4 months ago

Last modified 1 month ago

Problem with insertion of images in Firefox

Reported by: Ralix Assigned to: azaozz
Priority: normal Milestone: 2.6
Component: General Version: 2.5.1
Severity: normal Keywords: has-patch
Cc:

Description

After pressing the button to insert an image nothing happens. There was only a white window which was never closed.

I've found out the following problem in file "/wp-admin/js/media-upload.js":

// send html to the post editor
function send_to_editor(h) {
var win = window.opener ? window.opener : window.dialogArguments;
if ( !win )
win = top;
...

win” points to “/index.php” - but I think it should point to “/wp-admin/post-new.php”. So I've changed the code:

// 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 = parent;
...

After this changes it works fine in Firefox! I don't know why it works with the original code in Opera and not in Firefox. With the modified code it works in both browsers!

Attachments

media-upload.patch (0.6 kB) - added by azaozz on 04/30/08 19:17:05.

Change History

04/29/08 19:39:30 changed by Hirvine

Verified and okay. He's right. Using the latest Mozilla Firefox 2.0.0.14 and Wordpress 2.5.1 I got these insert issues. In Wordpress 2.5, all was fine. Editing the file as he explains works. I hope this fix get implemented in the next update.

04/29/08 23:35:20 changed by ryan

  • owner changed from anonymous to azaozz.

04/30/08 19:16:33 changed by azaozz

  • keywords set to has-patch.

Latest js security fix in FF 2.x seems to have changed it's behavior a bit.

04/30/08 19:17:05 changed by azaozz

  • attachment media-upload.patch added.

04/30/08 20:12:39 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [7860]) send_to_editor fix for FF. Props azaozz. fixes #6864 for trunk

04/30/08 20:12:55 changed by ryan

(In [7861]) send_to_editor fix for FF. Props azaozz. fixes #6864 for 2.5

07/15/08 16:24:07 changed by ryan

  • milestone changed from 2.5.2 to 2.9.

Milestone 2.5.2 deleted

07/30/08 20:33:05 changed by westi

  • milestone changed from 2.9 to 2.6.