rem: SetFocusThreadPane(); var scrolled = false; if (gNextMessageAfterLoad) { var type = gNextMessageAfterLoad; gNextMessageAfterLoad = null; 
add: SetFocusThreadPane(); var scrolled = false; 
context:     OnItemEvent: function(folder, event) {        var eventType = event.GetUnicode();        if (eventType == "FolderLoaded") {		if(folder)		{			var resource = folder.QueryInterface(Components.interfaces.nsIRDFResource);			if(resource)			{				var uri = resource.Value;				if(uri == gCurrentFolderToReroot)				{					gCurrentFolderToReroot="";					var msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);					if(msgFolder)					{						msgFolder.endFolderLoading();						RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType, gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType, gCurrentLoadingFolderSortOrder);						gIsEditableMsgFolder = IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_DRAFTS);						gCurrentLoadingFolderSortType = 0;						gCurrentLoadingFolderSortOrder = 0;            gCurrentLoadingFolderViewType = 0;            gCurrentLoadingFolderViewFlags = 0;            SetFocusThreadPane();            var scrolled = false;            if (gNextMessageAfterLoad)             {              var type = gNextMessageAfterLoad;              gNextMessageAfterLoad = null;              // scroll to and select the proper message              scrolled = ScrollToMessage(type, true, true /* selectMessage */);            }					}				}				if(uri == gCurrentLoadingFolderURI)				{				  gCurrentLoadingFolderURI = "";				  //Now let's select the first new message if there is one                  var beforeScrollToNew;				  if(showPerformance) {				    beforeScrollToNew = new Date();                  }                  if (!scrolled) {                    // if we didn't just scroll, scroll to the first new message                    // don't select it though				    scrolled = ScrollToMessage(nsMsgNavigationType.firstNew, true, false /* selectMessage */);                                        // if we failed to find a new message, scroll to the top                    if (!scrolled) {                      EnsureRowInThreadOutlinerIsVisible(0);                    }                  }				  if(showPerformance) {				      var afterScrollToNew = new Date();				      var timeToScroll = (afterScrollToNew.getTime() - beforeScrollToNew.getTime())/1000;				      var afterFolderLoadTime = new Date();				      var timeToLoad = (afterFolderLoadTime.getTime() - gBeforeFolderLoadTime.getTime())/1000;					  dump("Time to load " + uri + " is " +  timeToLoad + " seconds\n");				  	  dump("of which scrolling to new is " + timeToScroll + " seconds\n");				  }    				SetBusyCursor(window, false);				}			}		}        } else if (eventType == "DeleteOrMoveMsgCompleted") {			HandleDeleteOrMoveMsgCompleted(folder);        }               else if (eventType == "DeleteOrMoveMsgFailed") {                        HandleDeleteOrMoveMsgFailed(folder);        }          else if (eventType == "CompactCompleted") {                        HandleCompactCompleted(folder);        }    }
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/46dde148e9589ceac527f41cfa159be34caa33f3/msgMail3PaneWindow.js/buggy/mailnews/base/resources/content/msgMail3PaneWindow.js