WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6864 closed defect (bug) (fixed)

Problem with insertion of images in Firefox

Reported by: Ralix Owned by: 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 7 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 @Hirvine7 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.

comment:2 @ryan7 years ago

  • Owner changed from anonymous to azaozz

comment:3 @azaozz7 years ago

  • Keywords has-patch added

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

@azaozz7 years ago

comment:4 @ryan7 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

comment:5 @ryan7 years ago

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

comment:6 @ryan7 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:7 @westi7 years ago

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