luci-mod-status: fix syslog / dmesg scroll for some themes
[project/luci.git] / modules / luci-mod-status / htdocs / luci-static / resources / view / status / dmesg.js
index 89e2000abda6fc3d7460d343f0c5a1227f1d8d75..acddf454f58c1a50507e4be187f45cee4fd5ea02 100644 (file)
@@ -22,7 +22,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', { 
@@ -31,7 +31,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([], [