Opened 9 years ago

Closed 9 years ago

#2381 closed Bug (fixed)

Double Iframes for FCKeditor

Reported by: Jeff Owned by: Artur Formella
Priority: Normal Milestone: FCKeditor 2.6.4
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description

Possibly asked and answered.

Sorry I don't have time to download and verify bugs, and I'm not sure what component this even belongs to.

We're using Drupal 5.6 with the 5.x-2.2-beta2 module of FCKeditor.

What I suspect is that the error is only visible with this combination.

What I know is the error is completely avoidable.

in fckeditor.js

in function FCKeditor.ReplaceTextarea()

Add the following code at the very beginning:


var oIFrame = document.getElementById(this.InstanceName + '_Frame');

if (!oIFrame) {


Then add the following code at the very end:


}


This protective if-block will prevent any duplicates from be formed, since the code inside that if-block creates the iframe with then name: this.InstanceName + '_Frame'.

Yes, it's probably the fault of some other library further up. Shouldn't matter. Code should do the right thing, and duplicate editors is bad. This won't appreciably affect speed of the component, and is a good thing.

If I'm reporting this the wrong way, sorry, if I'm reporting to to the wrong place, double my-bad. But there you go.

Jeff

Attachments (2)

2381.patch (482 bytes) - added by Artur Formella 9 years ago.
2381_2.patch (1.0 KB) - added by Artur Formella 9 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by Jeff

sorry the funny formating messed up the Frame that's supposed to be three '_' underscores before the text 'Frame'.

comment:2 Changed 9 years ago by Artur Formella

Keywords: Confirmed added

Changed 9 years ago by Artur Formella

Attachment: 2381.patch added

comment:3 Changed 9 years ago by Artur Formella

Keywords: Review? added

comment:4 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review- added; Review? removed

As the oIframe variable isn't used after that check I think that the code can be further simplified to

if ( document.getElementById( this.InstanceName + '___Frame' ) ) 
 	return ; 

you also need to add the change for the what's new file

comment:5 Changed 9 years ago by Alfonso Martínez de Lizarrondo

and another detail: you should assign to yourself the bugs where you are working.

Changed 9 years ago by Artur Formella

Attachment: 2381_2.patch added

comment:6 Changed 9 years ago by Artur Formella

Keywords: Review? added; Review- removed
Owner: set to Artur Formella
Status: newassigned

comment:7 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review+ added; Review? removed
Milestone: FCKeditor 2.6.4

comment:8 Changed 9 years ago by Artur Formella

Resolution: fixed
Status: assignedclosed

Fixed with [2558]

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy