@ -1240,6 +1240,30 @@ function headlines_scroll_handler(e) {
unpackVisibleHeadlines ( ) ;
var active _found = false ;
// set topmost child in the buffer as active
if ( getInitParam ( "cdm_auto_catchup" ) == 1 ) {
var rows = $$ ( "#headlines-frame > div[id*=RROW]" ) ;
for ( var i = 0 ; i < rows . length ; i ++ ) {
var child = rows [ i ] ;
if ( ! active _found && $ ( "headlines-frame" ) . scrollTop < child . offsetTop ) {
active _found = true ;
if ( _active _article _id ) {
var row = $ ( "RROW-" + _active _article _id ) ;
if ( row ) row . removeClassName ( "active" ) ;
}
_active _article _id = child . id . replace ( "RROW-" , "" ) ;
showArticleInHeadlines ( _active _article _id , true ) ;
break ;
}
}
}
if ( ! _infscroll _disable ) {
if ( ( hsp && e . scrollTop + e . offsetHeight >= hsp . offsetTop - hsp . offsetHeight ) ||
( e . scrollHeight != 0 &&
@ -1275,6 +1299,7 @@ function headlines_scroll_handler(e) {
//console.log("auto_catchup_batch: " + catchup_id_batch.toString());
}
} ) ;
if ( catchup _id _batch . length > 0 ) {