luci-mod-status: add .blur() action for kernel log scroll buttons
authorPaul Donald <[email protected]>
Sun, 29 Jun 2025 17:31:49 +0000 (19:31 +0200)
committerPaul Donald <[email protected]>
Sun, 29 Jun 2025 17:31:49 +0000 (19:31 +0200)
Signed-off-by: Paul Donald <[email protected]>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/dmesg.js

index 8e312cb78001643c23b5b42435ce2fd2fe5bebe4..9050d1cb1237502d74ec1a4530a443170df3a240 100644 (file)
@@ -133,14 +133,20 @@ return view.extend({
                                'class': 'cbi-button cbi-button-neutral',
                        }, _('Scroll to tail', 'scroll to bottom (the tail) of the log file')
                );
-               scrollDownButton.addEventListener('click', () => scrollUpButton.scrollIntoView());
+               scrollDownButton.addEventListener('click', () => {
+                       scrollUpButton.scrollIntoView();
+                       scrollUpButton.blur();
+               });
 
                const scrollUpButton = E('button', { 
                                'id' : 'scrollUpButton',
                                'class': 'cbi-button cbi-button-neutral',
                        }, _('Scroll to head', 'scroll to top (the head) of the log file')
                );
-               scrollUpButton.addEventListener('click', () => scrollDownButton.scrollIntoView());
+               scrollUpButton.addEventListener('click', () => {
+                       scrollDownButton.scrollIntoView();
+                       scrollDownButton.blur();
+               });
 
                const self = this;