]> git.wh0rd.org Git - tt-rss.git/commitdiff
tweak cdmExpandArticle behavior with scrolling (refs #604) (2)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Mar 2013 05:32:04 +0000 (09:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Mar 2013 05:32:04 +0000 (09:32 +0400)
js/viewfeed.js

index a557b1b183a7c850e63bd5e72bc65746304b3010..014946af86925d437521f14e6e2968e6b1d60d70 100644 (file)
@@ -1392,10 +1392,8 @@ function cdmExpandArticle(id) {
 
                var new_offset = $("RROW-" + id).offsetTop;
 
-               $("headlines-frame").scrollTop += (new_offset-old_offset);
-
-//             if ($("RROW-" + id).offsetTop != old_offset)
-//                     $("headlines-frame").scrollTop = new_offset;
+               if (old_offset > new_offset)
+                       $("headlines-frame").scrollTop -= (old_offset-new_offset);
 
                toggleUnread(id, 0, true);
                toggleSelected(id);