editArea hooks several resize events. These are never removed and use the global editArea (in the iframe.window scope).
The resize on the (iframe.)window will die with the iframe.
However the resize event on the parent.window top.window will stay forever and keep referencing the global EditArea in the iframe.
So the resize event will still be called from parent.window and top.window but will try to use the now non-existing EditArea (in the iframe.window scope) to call update_size().
This is a nasty bug for webapplications which have to rely their components clean up or strange errors happen. (for which Firebug sometimes has the habbit of pointing to wrong js files and lines.)
Although fixing this should be easy, before submitting a patch for this I hope to find out why it is/was nessecary to add resize events to parent.window and top.window.
(forgot to login, I (Spellcoder) posted this bugreport)
The resize event on parent.window is necessary for fullscreen mode, so it will resize with the frame the EditArea iframe runs in.
As far as I can see the resize event on top.window has no real use.
A fix would probably be:
- remove the add_event for top.window
- add an remove_event function to edit_area.js and remove the resize event on parent.window in delete_instance
- change the event hooking somehow to not use the editArea global to the iframe, because when using EditArea in an framework we might not get notified to delete the instance before the framework removes us from the document. (in which case we don't have the iframe.contentWindow.editArea global anymore and removing the event will fail).