summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-05-16 10:50:36 +0400
committerAndrew Dolgov <[email protected]>2013-05-16 10:50:38 +0400
commit99d89d10b0c6fed9b921c22e9a6fb39de859e85d (patch)
tree0664e4e4b9f040bdc9b5a3cd557989b26fdf1995 /js
parenta9cd27d6e6d442e6633ed5eec47b84016b1729d1 (diff)
when auto selecting, only select articles actually near the buffer top
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index de3f660be..50bec1966 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -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");