rem: while ( enumerator.hasMoreElements()  ) { var  tempWindow = enumerator.getNext(); if (tempWindow != window && tempWindow.editorShell && 
add: while ( enumerator.hasMoreElements()  ) { var  tempWindow = enumerator.getNext(); if (tempWindow != window && tempWindow.editorShell && 
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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/eaa6754a0a946375badf1165b3e4af3999e4b03c/editor.js/buggy/editor/ui/composer/content/editor.js