luci-mod-status: add .blur() action for kernel log scroll buttons

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2025-06-29 19:31:49 +02:00
parent f62f31ca70
commit f458c39c74

View 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;