rem: setTimeout("window.content.focus()", 10); 
add: setTimeout("window._content.focus()", 10); 
context: function SetEditMode(mode){  if (gIsHTMLEditor)  {    // Be sure toolbar is visible    gEditModeBar.setAttribute("hidden", "");    gEditModeBar.setAttribute("collapsed", "");    // Remember the state    document.persist("EditModeToolbar","hidden");    document.persist("EditModeToolbar","collapsed");    var bodyNode = editorShell.editorDocument.getElementsByTagName("body").item(0);    if (!bodyNode)    {      dump("SetEditMode: We don't have a body node!\n");      return;    }    // Switch the UI mode before inserting contents    //   so user can't type in source window while new window is being filled    var previousMode = gEditorDisplayMode;    if (!SetDisplayMode(mode))      return;    if (mode == DisplayModeSource)    {      // Get the current contents and output into the SourceWindow      if (bodyNode)      {        var childCount = bodyNode.childNodes.length;        if( childCount)        {          gSourceContentWindow.value = editorShell.GetContentsAs("text/html", gOutputBodyOnly);          gSourceContentWindow.focus();          setTimeout("gSourceContentWindow.focus()", 10);          return;        }      }      // If we fall through, revert to previous node      SetDisplayMode(PreviousNonSourceDisplayMode);    }    else if (previousMode == DisplayModeSource)     {      // We are comming from edit source mode,      //   so transfer that back into the document      editorShell.SelectAll();      editorShell.InsertSource(gSourceContentWindow.value);      // Clear out the source editor buffer      gSourceContentWindow.value = "";      // reset selection to top of doc (wish we could preserve it!)      if (bodyNode)        editorShell.editorSelection.collapse(bodyNode, 0);      window.content.focus();      // yuck. what is this?      setTimeout("window.content.focus()", 10);    }  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/03ea82871ae0d2b0e52e9f402c89829c8a4feb6a/editor.js/clean/editor/ui/composer/content/editor.js