when auto selecting, only select articles actually near the buffer top

This commit is contained in:
Andrew Dolgov 2013-05-16 10:50:36 +04:00
parent a9cd27d6e6
commit 99d89d10b0

View file

@ -1247,7 +1247,9 @@ function headlines_scroll_handler(e) {
for (var i = 0; i < rows.length; i++) {
var child = rows[i];
if ($("headlines-frame").scrollTop < child.offsetTop) {
if ($("headlines-frame").scrollTop < child.offsetTop &&
child.offsetTop - $("headlines-frame").scrollTop < 50) {
if (_active_article_id) {
var row = $("RROW-" + _active_article_id);
if (row) row.removeClassName("active");