Ticket #6864 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

Problem with insertion of images in Firefox

Reported by: Ralix Owned by: 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 Download (584 bytes) - added by azaozz 4 years ago.

Change History

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.

comment:2   ryan4 years ago

  • Owner changed from anonymous to azaozz
  • Keywords has-patch added

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

azaozz4 years ago

comment:4   ryan4 years ago

  • Status changed from new to closed
  • Resolution set to fixed

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

comment:5   ryan4 years ago

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

comment:6   ryan4 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

  • Milestone changed from 2.9 to 2.6
Note: See TracTickets for help on using tickets.