#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: |
Description
Switch to Source throws error in the Error Console.
Attachments (1)
Change History (5)
comment:1 Changed 18 years ago by
Owner: | set to Alfonso |
---|---|
Status: | new → assigned |
comment:2 Changed 18 years ago by
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
Attachment: | nullified iframe references.patch added |
---|
comment:3 Changed 18 years ago by
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
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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 :)
I'll try to understand what's going on.