From: Paul Donald Date: Sun, 29 Jun 2025 17:31:49 +0000 (+0200) Subject: luci-mod-status: add .blur() action for kernel log scroll buttons X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f458c39c74fb97b0b97bae73572d4abbe169115b;p=project%2Fluci.git luci-mod-status: add .blur() action for kernel log scroll buttons Signed-off-by: Paul Donald --- diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/dmesg.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/dmesg.js index 8e312cb780..9050d1cb12 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/dmesg.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/dmesg.js @@ -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;