rem: window.focus(); 
add: win.focus(); 
context: function editPage(url, launchWindow, delay){  var focusedWindow = document.commandDispatcher.focusedWindow;  if (isDocumentFrame(focusedWindow))    url = focusedWindow.location.href;  // User may not have supplied a window  if (!launchWindow)  {    if (window)    {      launchWindow = window;    }    else    {      dump("No window to launch an editor from!\n");      return;    }  }  // if the current window is a browser window, then extract the current charset menu setting from the current   // document and use it to initialize the new composer window...  var wintype = document.firstChild.getAttribute('windowtype');  var charsetArg;  if (launchWindow && (wintype == "navigator:browser") && launchWindow._content.document)    charsetArg = "charset=" + launchWindow._content.document.characterSet;  try {    var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();    var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);    var enumerator = windowManagerInterface.getEnumerator( "composer:html" );    while ( enumerator.hasMoreElements() )    {      var window = windowManagerInterface.convertISupportsToDOMWindow( enumerator.getNext() );      if ( window && window.editorShell)      {        if (window.editorShell.checkOpenWindowForURLMatch(url, window))        {          // We found an editor with our url          window.focus();          return;        }      }    }    // Create new Composer window    if (delay)      launchWindow.delayedOpenWindow("chrome://editor/content", "chrome,all,dialog=no", url, charsetArg);    else      launchWindow.openDialog("chrome://editor/content", "_blank", "chrome,all,dialog=no", url, charsetArg);  } catch(e) {}}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/d4045452e6b1abb59c43031e6f68bfa7b1be0d80/editorApplicationOverlay.js/buggy/editor/ui/composer/content/editorApplicationOverlay.js