Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#12 closed Bug (fixed)

Opera: Switch to Source throws error

Reported by: Frederico Caldeira Knabben Owned by: Alfonso
Priority: Normal Milestone: Opera Compatibility
Component: General Version:
Keywords: Cc:


Switch to Source throws error in the Error Console.

Attachments (1)

nullified iframe references.patch (538 bytes) - added by Alfonso 18 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 18 years ago by Alfonso

Owner: set to Alfonso
Status: newassigned

I'll try to understand what's going on.

comment:2 Changed 18 years ago by Alfonso

When switching between editing modes the iframe or textarea is removed from its parent, but the reference in FCK.EditorWindow to the iframe window is kept and in that case Opera closes the window and the only property available is FCK.EditorWindow.closed == true

On one hand there's no reason to base the toolbar state on a non-existing window, and even keeping a reference to such useless window can be considered as bad because it doesn't allow garbage cleaning. I think that it should be good if after removing the iframe the FCK.EditorWindow is nulled as well as FCK.EditorDocument.

In fact I've tested just putting the code and it seems to work, I'm attaching a patch so you can test it without adding the code to SVN.

Changed 18 years ago by Alfonso

comment:3 Changed 18 years ago by Alfonso

Wow, the handling of patches inside the tracking system it's really good, it does allow to understand the patched code in a really nice way.

comment:4 Changed 18 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

You are right Alfonso. Great job.

I've just committed your code to the SVN. I've moved it from fckeditingarea.js to fck_1.js, inside the SetHTML function. In this way we create no dependences in the code, and that file is also the place where FCK.EditorWindow and FCK.EditorDocument are set (see _FCK_EditingArea_OnLoad()). Actually the "OnLoad" event for the FCKEditingArea should be changed to get fired when we are in source mode too.

One of the things that I would like to do in the near future is to deploy a Component Library derived from FCKeditor, so one could even create his own editor using some pieces of FCKeditor, or use these "pieces" for any other purpose. So, whenever possible, we should try to avoid components dependencies.

Well... there are so many things I would like to talk about... I we could only stop the time for a while :)

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