luci-mod-status: fix syslog / dmesg scroll for some themes
[project/luci.git] / modules / luci-mod-status / htdocs / luci-static / resources / view / status / syslog.js
index d3de8af756b02a9e41455754a30c4325139660d7..6ef7d09c70bd7ff94343515a29cd38bd5d853e36 100644 (file)
@@ -28,7 +28,7 @@ return view.extend({
                        }, _('Scroll to tail', 'scroll to bottom (the tail) of the log file')
                );
                scrollDownButton.addEventListener('click', function() {
-                       window.scrollTo(0, document.body.scrollHeight);
+                       scrollUpButton.focus();
                });
 
                var scrollUpButton = E('button', { 
@@ -37,7 +37,7 @@ return view.extend({
                        }, _('Scroll to head', 'scroll to top (the head) of the log file')
                );
                scrollUpButton.addEventListener('click', function() {
-                       window.scrollTo(0, 0);
+                       scrollDownButton.focus();
                });
 
                return E([], [