Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6864 closed defect (bug) (fixed)

Problem with insertion of images in Firefox

Reported by: ralix's profile Ralix Owned by: azaozz's profile azaozz
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords: has-patch
Focuses: 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 (1)

media-upload.patch (584 bytes) - added by azaozz 17 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Hirvine
17 years ago

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.

#2 @ryan
17 years ago

  • Owner changed from anonymous to azaozz

#3 @azaozz
17 years ago

  • Keywords has-patch added

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

#4 @ryan
17 years ago

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

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

#5 @ryan
17 years ago

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

#6 @ryan
17 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#7 @westi
17 years ago

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