rem: tempWindow.InsertCharWindow.editorShell = tempWindow.editorShell; tempWindow.InsertCharWindow.opener = tempWindow; return; 
add: tempWindow.InsertCharWindow.editorShell = tempWindow.editorShell; tempWindow.InsertCharWindow.opener = tempWindow; return; } 
context: function SwitchInsertCharToAnotherEditorOrClose(){  if ("InsertCharWindow" in window && window.InsertCharWindow)  {    var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();    var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);    var enumerator = windowManagerInterface.getEnumerator( null );    // TODO: Fix this to search for command controllers and look for "cmd_InsertChars"    // For now, detect just Web Composer and HTML Mail Composer    while ( enumerator.hasMoreElements()  )    {      var  tempWindow = enumerator.getNext();      if (tempWindow != window && tempWindow.editorShell &&          tempWindow.gIsHTMLEditor || tempWindow.editorShell.editorType == "htmlmail")//          tempWindow.editorShell.editorDocument.commandDispatcher.getControllerForCommand("cmd_InsertChars"))      {        tempWindow.InsertCharWindow = window.InsertCharWindow;        window.InsertCharWindow = null;        tempWindow.InsertCharWindow.editorShell = tempWindow.editorShell;        tempWindow.InsertCharWindow.opener = tempWindow;        return;      }    }    // Didn't find another editor - close the dialog    window.InsertCharWindow.close();  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/4dbae367965f08293cddf648b012b562fbf77b33/editor.js/clean/editor/ui/composer/content/editor.js