#2519: Firefox 3 form submit via javascript with multiple editor instances
----------------------+-----------------------------------------------------
  Reporter:  ccarey   |       Owner:                   
      Type:  Bug      |      Status:  new              
  Priority:  Normal   |   Milestone:                   
 Component:  General  |     Version:  FCKeditor 2.6.3  
Resolution:           |    Keywords:  Confirmed Firefox
----------------------+-----------------------------------------------------

Comment(by ccarey):

 Here's something that may be of help - we found today that running the
 uncompressed source (fckeditor.original.html) is much more stable under
 Firefox3.

 The problem boils down to the init routine running twice.

 I hacked some code into the compressed version (fckeditorcode_gecko.js) to
 show me what editors were in the collection at each stage during startup.
 Line numbers are meaningless here since it's all compressed so I'll just
 list the location

 This code was added right after
 '''FCKeditorAPI.Instances[FCK.Name]=FCK;'''

 {{{
 /* show me what you have stored */
 console.log("------------------------------------------------");
 window.console.log('++ add instance : ' +
 FCKeditorAPI.Instances[FCK.Name]);
 console.log("++ editors in collection ++");
         var inst = FCKeditorAPI.__Instances;
         for(var o in inst) console.log(o);
 };
 }}}

 ... and this was added right after '''window.FCKeditorAPI = {'''


 {{{
 /* tell me when you run */
 window.FCKeditorAPI = {logOutput:console.log("init - instances cleared"),
 }}}


 The output is this:


 {{{
 init - instances cleared
 ------------------------------------------------
 ++ add instance : middle_column_heading
 ++ editors in collection ++
 middle_column_heading
 ------------------------------------------------
 ++ add instance : middle_column_content
 ++ editors in collection ++
 middle_column_heading
 middle_column_content
 init - instances cleared
 ------------------------------------------------
 ++ add instance : left_column_header
 ++ editors in collection ++
 left_column_header

 }}}

 Note that the string "init - instances cleared" appears twice. I've added
 three instances, but only one ends up in the collection since the
 collection itself is cleared sometime after the second editor is created
 (on this run -- sometimes the init runs sooner, resulting in only the
 first instance being killed).

 There's a copy of the hacked file here:
 [http://staging.fi.net.au/fckeditor/hacked_fckeditorcode_gecko.js]

 Making the same edits to the uncompressed fckeditorapi.js results in this
 output:


 {{{
  ....loading....
 Firebug's log limit has been reached. %S entries not shown.
 Preferences
 init - instances cleared
 ------------------------------------------------
 ++ add instance : left_column_header
 ++ editors in collection ++
 left_column_header
 ------------------------------------------------
 ++ add instance : middle_column_heading
 ++ editors in collection ++
 left_column_header
 middle_column_heading
 ------------------------------------------------
 ++ add instance : middle_column_content
 ++ editors in collection ++
 left_column_header
 middle_column_heading
 middle_column_content

 }}}

 Note that the init routine only reports running once at the very start (as
 you'd expect)

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2519#comment:5>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to