summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status
diff options
context:
space:
mode:
authorPaul Donald <newtwen@gmail.com>2023-12-04 03:44:10 +0100
committerGitHub <noreply@github.com>2023-12-04 03:44:10 +0100
commit706668243b8617d5c5529ac76e54f84dc57203e3 (patch)
tree757b9e8f05216717241b2dd9e4f0253ce02c4064 /modules/luci-mod-status
parentdd3f5c65470c62ae977de047e975138195bf45e6 (diff)
parentdb543b5fed5e2f22d9546d9184ee9a745dfa3609 (diff)
Merge pull request #6295 from jjm2473/patch-1
luci-mod-status: fix iptables jump on argon theme
Diffstat (limited to 'modules/luci-mod-status')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js
index e409a5ac50..917dada57a 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js
@@ -252,7 +252,11 @@ return view.extend({
elem = document.getElementById('rule_%s_%s'.format(table.toLowerCase(), chain));
if (elem) {
- (document.documentElement || document.body.parentNode || document.body).scrollTop = elem.offsetTop - 40;
+ if (elem.scrollIntoView) {
+ elem.scrollIntoView();
+ } else {
+ (document.documentElement || document.body.parentNode || document.body).scrollTop = elem.offsetTop - 40;
+ }
elem.classList.remove('flash');
void elem.offsetWidth;
elem.classList.add('flash');