Opened 16 years ago

Last modified 16 years ago

#1654 closed Bug

E.contentWindow.document.body.innerHTML does not exist — at Version 2

Reported by: Jörg Roßdeutscher Owned by:
Priority: Normal Milestone: FCKeditor 2.6
Component: General Version: FCKeditor 2.5
Keywords: Review+ Cc:

Description (last modified by Alfonso Martínez de Lizarrondo)

Line 48 in fckeditor_gecko.js gives me an error in Firefox with FCKeditor release 2.5.

I tracked it down to:

if (E.contentWindow ) E.contentWindow.document.body.innerHTML='';

Even I don´t know exactly what´s happening here the "style" seems not to be clean for me: Checking if an object exist and then accessing two levels deeper than checked.

I changed to:

if (E.contentWindow && E.contentWindow.document && E.contentWindow.document.body ) E.contentWindow.document.body.innerHTML='';

and now everything works as expected.

Change History (3)

comment:1 in reply to:  description Changed 16 years ago by Jörg Roßdeutscher

The bugtracker deleted the two quote characters from my report. The string is set empty after the equal sign.

Changed 16 years ago by Jörg Roßdeutscher

Attachment: fckeditorcode_gecko.js added

mentioned file with applied changes

comment:2 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Description: modified (diff)
Keywords: Pending added
Version: FCKeditor 2.5

What are you doing to get the error?
What's your version of Firefox?
Did you make any other changes?

Before applying any changes it's better that we can understand exactly what we are doing, and besides that, the changes need to be done to the _source files as any changes to the compressed file that you have uploaded will be lost automatically.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy