rem: gCalendarEventTreeClicked = false; 
add: /* This needs to be in a setTimeout */ setTimeout( "resetSelection()", 1 ); 
context: function calendarUnifinderInit( ){   var unifinderEventSelectionObserver =    {      onSelectionChanged : function( EventSelectionArray )      {         // XXX This selection observer needs to be re written.         // Problems: When selecting everything,                   if( gCalendarEventTreeClicked === false )         {            var SearchTree = document.getElementById( UnifinderTreeName );                        if( EventSelectionArray.length > 1 )            {               //get all the rows for the events               for( i = 0; i < EventSelectionArray.length; i++ )               {                  var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[i] );               }               //select all the rows in the tree.                           }            else if( EventSelectionArray.length == 1 )            {               SearchTree.treeBoxObject.selection.clearSelection( );                           var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] );                                 SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo );               SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 );            }         }                  gCalendarEventTreeClicked = false;      }   }         gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6c73edd7bf666f4ad0ac7a427701d0d4039ab697/unifinder.js/clean/calendar/resources/content/unifinder.js