#1255: Javascript error in Firefox:  FCK is not defined
-------------------------+--------------------------------------------------
  Reporter:  gboissiere  |       Owner:                   
      Type:  Bug         |      Status:  new              
  Priority:  Normal      |   Milestone:                   
 Component:  General     |     Version:                   
Resolution:              |    Keywords:  Confirmed Firefox
-------------------------+--------------------------------------------------
Comment (by serializer):

 I'm seeing this bug while trying to fix #234. My comments there contain
 some further observations. Basically:

  - In fckeditorapi.js line 143, in _AttachFormSubmitToAPI(), a 'submit'
 event is attached to the parent form, calling FCK.UpdateLinkedField
  - This event is not DEtached when an FCK is removed from the DOM
  - Then, when a submit event fires (which in #234 is happening in a screwy
 place when the editor has been briefly removed between postbacks), the
 function is called, but no longer has a base object. Any attempt to access
 the FCK variable fires the error. I've tried adding if (FCK) { ... } and
 if (FCK==undefined) { ... } but the error is still thrown. This could even
 indicate a bug in Firefox itself.

 So; I need a way to detach this event when the FCK is removed from the
 page. Unfortunately I can't figure out how to access the FCKTools object
 to use its RemoveEventListener method, to detach the event from the parent
 form. The _AttachFormSubmitToAPI() function seems to be called from
 fckeditor.html, inside the iframe itself; but I need to call a function
 from *outside* the iframe to detach it.

 I've tried using the onunload event in fckeditor.html, but by that point
 the GetParentForm() function returns null, so there is no way to detach
 the event there.

 Can we escalate this - these events really should be getting cleaned up to
 avoid memory leaks and so forth!

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/1255#comment:2>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to