]> git.wh0rd.org Git - tt-rss.git/commitdiff
hidden feedlist: save scroll offset
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 19 Feb 2008 17:24:26 +0000 (18:24 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 19 Feb 2008 17:24:26 +0000 (18:24 +0100)
tt-rss.js

index 9cbe0513435f56e671721cb1b3d6a5db37297d36..cd65fe79964199170c46ee90173240cd379eb3a4 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -13,6 +13,7 @@ var active_feed_id = 0;
 var active_feed_is_cat = false;
 var number_of_feeds = 0;
 var sanity_check_done = false;
+var _hfd_scrolltop = 0;
 
 var init_params = new Object();
 
@@ -748,8 +749,10 @@ function toggle_feedlist() {
                if (!Element.visible(fl)) {
                        Element.show(fl);
                        fl.style.zIndex = 30;
+                       fl.scrollTop = _hfd_scrolltop;
                } else {
-                       Element.hide(fl);
+                       _hfd_scrolltop = fl.scrollTop;
+                       Element.hide(fl);                       
 //                     Effect.Fade(fl, {duration : 0.2, 
 //                             queue: { position: 'end', scope: 'FLFADEQ', limit: 1 }});
                }