rem: window.addEventListener("keypress", ctrlNumberTabSelection, true); 
add: window.addEventListener("keypress", ctrlNumberTabSelection, false); 
context: function delayedStartup(){  if (gIsLoadingBlank)    prepareForStartup();  // loads the services  initServices();  initBMService();    gBrowser.addEventListener("load", function(evt) { setTimeout(loadEventHandlers, 0, evt); }, true);  window.addEventListener("keypress", ctrlNumberTabSelection, true);  if (gMustLoadSidebar) {    var sidebar = document.getElementById("sidebar");    var sidebarBox = document.getElementById("sidebar-box");    sidebar.setAttribute("src", sidebarBox.getAttribute("src"));  } #ifdef XP_WIN  // Perform default browser checking (after window opens).  try {    var dialogShown = Components.classes["@mozilla.org/winhooks;1"]                    .getService(Components.interfaces.nsIWindowsHooks)                    .checkSettings(window);  } catch(e) {  }#endif  // now load bookmarks  BMSVC.readBookmarks();    var bt = document.getElementById("bookmarks-ptf");  if (bt) {    var btf = BMSVC.getBookmarksToolbarFolder().Value    bt.ref = btf;    document.getElementById("bookmarks-chevron").ref = btf;    bt.database.AddObserver(BookmarksToolbarRDFObserver);  }  window.addEventListener("resize", BookmarksToolbar.resizeFunc, false);  controllers.appendController(BookmarksMenuController);  // called when we go into full screen, even if it is   // initiated by a web page script  window.addEventListener("fullscreen", onFullScreen, false);  var element;  if (gIsLoadingBlank && gURLBar && !gURLBar.hidden && !gURLBar.parentNode.parentNode.collapsed)    element = gURLBar;  else    element = _content;  // This is a redo of the fix for jag bug 91884  var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]                     .getService(Components.interfaces.nsIWindowWatcher);  if (window == ww.activeWindow) {    element.focus();  } else {    // set the element in command dispatcher so focus will restore properly    // when the window does become active    if (element instanceof Components.interfaces.nsIDOMWindow) {      document.commandDispatcher.focusedWindow = element;      document.commandDispatcher.focusedElement = null;    } else if (element instanceof Components.interfaces.nsIDOMElement) {      document.commandDispatcher.focusedWindow = element.ownerDocument.defaultView;      document.commandDispatcher.focusedElement = element;    }  }  SetPageProxyState("invalid", null);  var toolbox = document.getElementById("navigator-toolbox");  toolbox.customizeDone = BrowserToolboxCustomizeDone;  gPrefService = Components.classes["@mozilla.org/preferences-service;1"]                              .getService(Components.interfaces.nsIPrefService);  gPrefService = gPrefService.getBranch(null);  var observerService = Components.classes["@mozilla.org/observer-service;1"]                                  .getService(Components.interfaces.nsIObserverService);  observerService.addObserver(dlObserver, "dl-start", false);    // Enable/Disable Form Fill  var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal);  pbi.addObserver(gFormFillPrefListener.domain, gFormFillPrefListener, false);  // Initialize  gFormFillPrefListener.toggleFormFill();  updateHomeTooltip();    // Initialize Plugin Overrides  const kOverridePref = "browser.download.pluginOverrideTypes";  if (gPrefService.prefHasUserValue(kOverridePref)) {    var types = gPrefService.getCharPref(kOverridePref);    types = types.split(",");        const kPluginOverrideTypesNotHandled = "browser.download.pluginOverrideTypesNotHandled";        var catman = Components.classes["@mozilla.org/categorymanager;1"].getService(Components.interfaces.nsICategoryManager);    var typesNotHandled = "";    for (var i = 0; i < types.length; ++i) {      // Keep track of all overrides for plugins that aren't actually installed,      // so we know not to show them in the plugin configuration dialog BUT       // don't delete the overrides such that when the user actually installs the       // plugin in this build their preferences are remembered.      try {        var catEntry = catman.getCategoryEntry("Gecko-Content-Viewers", types[i]);      }      catch (e) {        catEntry = "";      }      if (catEntry == "")        typesNotHandled += types[i] + ",";          catman.deleteCategoryEntry("Gecko-Content-Viewers", types[i], false);    }        if (typesNotHandled != "") {      typesNotHandled = typesNotHandled.substr(0, typesNotHandled.length - 1);      gPrefService.setCharPref(kPluginOverrideTypesNotHandled, typesNotHandled);    }    else if (gPrefService.prefHasUserValue(kPluginOverrideTypesNotHandled))      gPrefService.clearUserPref(kPluginOverrideTypesNotHandled);  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/559d416186c75da77e2777c0ecd760568cdfbd0f/browser.js/clean/browser/base/content/browser.js