]> git.wh0rd.org - tt-rss.git/commitdiff
scroll headlines and content container to top on update
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 10 Oct 2006 03:46:17 +0000 (04:46 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 10 Oct 2006 03:46:17 +0000 (04:46 +0100)
viewfeed.js

index d1aa349a6925075870b8b281e44c7f2c7ad5f0a6..16ff989c9cf8382aba4339cd462dcd1a4011250e 100644 (file)
@@ -19,6 +19,9 @@ function headlines_callback() {
        if (xmlhttp.readyState == 4) {
                debug("headlines_callback");
                var f = document.getElementById("headlines-frame");
+               try {
+                       f.scrollTop = 0;
+               } catch (e) { };
                f.innerHTML = xmlhttp.responseText;
                update_all_counters();
                if (typeof correctPNG != 'undefined') {
@@ -32,6 +35,9 @@ function article_callback() {
        if (xmlhttp.readyState == 4) {
                debug("article_callback");
                var f = document.getElementById("content-frame");
+               try {
+                       f.scrollTop = 0;
+               } catch (e) { };
                f.innerHTML = xmlhttp.responseText;
                if (typeof correctPNG != 'undefined') {
                        correctPNG();