mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-mod-status: log viewers - change focus() to scrollIntoView()
scrollIntoView() is more universally supported and standards tracked. Closes #7186 Updates9370bdddaeSigned-off-by: Paul Donald <newtwen+github@gmail.com> (cherry picked from commit7893f2d08a)
This commit is contained in:
@@ -22,7 +22,7 @@ return view.extend({
|
||||
}, _('Scroll to tail', 'scroll to bottom (the tail) of the log file')
|
||||
);
|
||||
scrollDownButton.addEventListener('click', function() {
|
||||
scrollUpButton.focus();
|
||||
scrollUpButton.scrollIntoView();
|
||||
});
|
||||
|
||||
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() {
|
||||
scrollDownButton.focus();
|
||||
scrollDownButton.scrollIntoView();
|
||||
});
|
||||
|
||||
return E([], [
|
||||
|
||||
@@ -28,7 +28,7 @@ return view.extend({
|
||||
}, _('Scroll to tail', 'scroll to bottom (the tail) of the log file')
|
||||
);
|
||||
scrollDownButton.addEventListener('click', function() {
|
||||
scrollUpButton.focus();
|
||||
scrollUpButton.scrollIntoView();
|
||||
});
|
||||
|
||||
var scrollUpButton = E('button', {
|
||||
@@ -37,7 +37,7 @@ return view.extend({
|
||||
}, _('Scroll to head', 'scroll to top (the head) of the log file')
|
||||
);
|
||||
scrollUpButton.addEventListener('click', function() {
|
||||
scrollDownButton.focus();
|
||||
scrollDownButton.scrollIntoView();
|
||||
});
|
||||
|
||||
return E([], [
|
||||
|
||||
Reference in New Issue
Block a user