From: Andrew Dolgov Date: Wed, 16 May 2007 04:06:05 +0000 (+0100) Subject: correctHeadlinesOffset: add opera remark X-Git-Tag: schema_freeze_for_1.2.11~41 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a5e46e0f76ef85677a6e07592ffcc8cb49822835;p=tt-rss.git correctHeadlinesOffset: add opera remark --- diff --git a/viewfeed.js b/viewfeed.js index abf483e2..4942a25c 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -363,10 +363,14 @@ function correctHeadlinesOffset(id) { debug("Rtop: " + rel_offset_top + " Rbtm: " + rel_offset_bottom); debug("Vport: " + viewport); - + if (rel_offset_top <= 0 || rel_offset_top > viewport) { container.scrollTop = row.offsetTop; } else if (rel_offset_bottom > viewport) { + + /* doesn't properly work with Opera in some cases because + Opera fucks up element scrolling */ + container.scrollTop = row.offsetTop + row.offsetHeight - viewport; }