From f458c39c74fb97b0b97bae73572d4abbe169115b Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Sun, 29 Jun 2025 19:31:49 +0200 Subject: [PATCH] luci-mod-status: add .blur() action for kernel log scroll buttons Signed-off-by: Paul Donald --- .../htdocs/luci-static/resources/view/status/dmesg.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.30.2